Suppose given a right-angle triangle with side lengths a,b and hypotenuse length c, as in the figure below. Then these side lengths are related by the equation a2+b2=c2.
We presented one proof of this theorem in the video, but there are many others.
Sine and Cosine
For an angle θ,cosθ and sinθ are respectively defined to be the x- and y-coordinates of the point at angle θ (measured counterclockwise from east) on the unit circle. This is illustrated in the following interactive diagram (use your mouse to drag the green dot around):
In general, the point at angle θ on a circle of radius r centered at [x0y0] has coordinates [x0+rcosθy0+rsinθ].
When 0≤θ<90∘, these can be interpreted in terms of ratios of side lengths of triangles:
cosθ=hypotenuseadjacentsinθ=hypotenuseopposite
Making the connection with triangles allows us to calculate cosθ and sinθ by exploiting the Pythagorean theorem, at least for 0≤θ<90∘; one can treat the general case by combining this with the identities cos(θ+90∘)=−sinθ,sin(θ+90∘)=cosθ (look at the diagram to convince yourself of these). In particular, the Pythagorean theorem implies that cos2θ+sin2θ=1 for all θ; this equation is also often referred to as the Pythagorean theorem.
Radians
Radians are the natural way to measure angles (whereas degrees are a human convention). By definition, one radian is the angle such that the arc length is equal to the radius of the circle. It follows that in general, an arc of radius r and angle θ has length rθ when θ is measured in radians.
The curved edge has the same length as the two straight lines.
We define the number 2π to be the number of radians in a circle (so that π is half the number of radians in a circle); thus a circle of radius r has circumference 2πr. We will soon learn a way to calculate these numbers, and find that 2π≈6.28 (and so π≈3.14). In particular, 1 radian=2π360 degrees≈57.3∘.
We won't actually need radians for a while, but this seemed like as good a place as any to bring them in. They are needed in calculus: for example, the formula sinx=x−3!x3+⋯ (which we'll encounter later) is only valid when x is measured in radians. Also, the trig functions in programming languages always expect their arguments in radians.
The ancient Greeks made a mistake in defining π=diametercircumference; although diameters are important in real life, in mathematics proper we essentially exclusively discuss circles in terms of their radius. In particular, the more fundamental constant is 2π=radiuscircumference. I may sometimes use the non-standard notation \(\Twopi \Defeq 2\pi\) (in this context, the symbol \(\Twopi\) should be pronounced "two-pi"). However, this is not something to get too hung up on: although \(\Twopi\) is an important number, numbers are not that important in mathematics.
Special values of cos and sin
We'll soon learn an algorithm to compute cos and sin of any angle. In the meantime, we can obtain exact values for a few standard angles:
θ (Degrees)
θ (Radians)
cosθ
sinθ
0
0
1
0
30
\(\Twopi/12\)
3/2
1/2
45
\(\Twopi/8\)
2/2
2/2
60
\(\Twopi/6\)
1/2
3/2
90
\(\Twopi/4\)
0
1
0∘ and 90∘ are obvious. We worked out the case 45∘ in the video, using the Pythagorean theorem. You'll do the cases 30∘ and 60∘ in the exercises.
Define the tangent function by \(\tan\theta \Defeq \dfrac{\sin\theta}{\cos\theta};\) that is, tanθ is the slope of the line passing through the origin at angle θ. We define tan90∘=tan270∘=∞; while we will later encounter the symbols +∞ and −∞, this is an unsigned or projective infinity.
Compute tanθ for the standard angles θ=0∘,30∘,45∘,60∘,90∘.
Consider the following diagram:
\((\cos\alpha, \sin\alpha)\)\((\cos\beta, \sin\beta)\)
By calculating the length of the green line segment in two different ways, establish the identity
\[
\begin{equation}
\displaystyle\label{silly-formula}
2\sin\left(\frac{\alpha-\beta}2\right) = \pm\sqrt{(\cos\alpha - \cos\beta)^2 + (\sin\alpha - \sin\beta)^2}
\end{equation}
\]
Once we've established \eqref{silly-formula}, we can derive all the usual trigonometric identities using algebraic manipulations, with no further geometric insight required.
Use \eqref{silly-formula} to derive the "half-angle formulas"
\[\begin{align}
\cos(\theta/2) &= \pm\sqrt{\frac{1+\cos(\theta)}2} \label{half-cos}\\
\sin(\theta/2) &= \pm\sqrt{\frac{1-\cos(\theta)}2}. \label{half-sin}
\end{align}\]
This is not the best way to derive these formulas, but it works; the point is mainly that you can get them from each other using pure algebra. We'll see a more enlightening explanation of \eqref{cos-sum} and \eqref{sin-sum} in a future lesson, and then the rest will follow by algebra in a similar way (in the opposite order as you derived them here). In any case, combining \eqref{cos-sum} and \eqref{sin-sum} with \eqref{half-cos} and \eqref{half-sin}—and using the fact that cos and sin are continuous (a notion we will explore in great detail later)—gives a general algorithm for computing cos and sin.