Hi Barbosa,
you should consult a book or website on elementary trigonometry to review the definitions of sine, cosine and tangent which are known as circular trigonometric functions.
In general ,
for angle x between 90 and 180 cosine( x) = minus cosine (180 - x)
for angle x between 180 and 270, cosine x = minus cosine (270 - x)
for angle x between 270 and 360, cosine x = plus cosine (360 - x)
So, for 135 degress the cosine is minus cosine (180 - 135) = minus cosine (45).
45 degrees is an easy angle for which to calculate the cosine, sine or tangent from the geometrical definition of these functions:
by drawing a right-angled triangle of side 1 and using the definition of cosine = adjacent side divided by the hypotenuse, cos(45) = 1/ sqrt(2) = sqrt(2)/2
so, cos (135) = minus sqrt(2) / 2 which is usually written as - sqrt(2)/ 2
and
for angle x between 90 and 180 sine( x) = plus sine (180 -x)
for angle x between 180 and 270, sine (x) = minus cosine (270 - x)
for angle x between 270 and 360, cosine (x) = minus cosine (360 - x)
and
for angle x between 90 and 180 tangent( x) = minus tangent (180 -x)
for angle x between 180 and 270, tangent (x) = plus tangent (270 - x)
for angle x between 270 and 360, tangent (x) = minus tangent (360 - x)
I would need to draw a circle divided into 4 and then place the angle in each quadrant to show you why the functions change from positive (plus) to negative (minus). It is not difficult to understand once you see the diagram of the circle divided into 4 and realize which 2 of the 4 'arms' are to be considerd as positive lengths.
You might be able to see the diagram in a book or at a website.
Good question!
Cheers!
Vincent