You can draw a right angled isosceles triangle.
Let the equal sides by 1 unit
The equal angles will be 45 degrees
Using Pythagoras' theorum you can determing that the hypotenuse is sqrt(2)
Then you can reas cos 45degrees straight off the triangle
$$cos 45 = \frac{1}{\sqrt2}\\$$
if you want to have a rational denominator then
$$cos 45 = \frac{1}{\sqrt2}=\frac{1}{\sqrt2}\times \frac{\sqrt2}{\sqrt2}=\frac{\sqrt2}{2}\\$$