# Sine

Definition

In a right triangle, the sine (abbreviated sin) of one of the other two angles is proportional to the length of the side opposite to that angle. An angle's cosine (cos) is proportional to the length of the shorter adjacent side.

```     .β
/|
c/ |b
/  |
/___|
α  a
```

With a, b, and c being the length of the respective sides, α and β denoting the angles (the third is a right angle, 90 degrees), the following holds:

sin(α) = b/c
sin(β) = a/c
cos(α) = a/c
cos(β) = b/c

General Laws

The results from the sine and cosines functions can be generalized for all triangles, by the law of sines, and the law of cosine respectively.

The law of sines holds for all triangles, and is stated as follows:

sin(a)/A = sin(b)/B = sin(c)/C

The law of cosines is an extension to the Pythagorean Theorem:

c2=a2 + b2 - 2ab Cos(C)

Angles and Periodicity

"Negative length" is interpreted as the respective side going against the natural (right, or up) direction. So cos becomes negative when α is in the range of 90 to 270 degrees, because then side a must extend to the left instead of to the right. Because b must go down for angles from 180 to 360 degrees, sin is negative in this range.

Sine and cosine are periodic functions, they repeat after 360 degrees, since angles that differ by an exact multiple of 360 degrees are equal:

sin(α) = sin(α + k × 360°)
cos(α) = cos(α + k × 360°)

(k being any positive or negative integer).