Notes

Pythagorean Theorem

Suppose given a right-angle triangle with side lengths a,ba,\, b and hypotenuse length c,c, as in the figure below. Then these side lengths are related by the equation a2+b2=c2.a^2 + b^2 = c^2.

\(\underbrace{\hspace{10em}}_{\displaystyle a}\) \(\underbrace{\hspace{5em}}\) \(\underbrace{\hspace{11em}}\) \(b\) \(c\)

We presented one proof of this theorem in the video, but there are many others.

Sine and Cosine

For an angle θ,\theta, cosθ\cos\theta and sinθ\sin\theta are respectively defined to be the x- and y-coordinates of the point at angle θ\theta (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 θ\theta on a circle of radius rr centered at [x0y0]\begin{bmatrix}x_0\\y_0\end{bmatrix} has coordinates [x0+rcosθy0+rsinθ].\begin{bmatrix}x_0 + r\cos\theta\\y_0 + r\sin\theta\end{bmatrix}.

When 0θ<90,0\le \theta < 90^\circ, these can be interpreted in terms of ratios of side lengths of triangles:

θ hypotenuse adjacent opposite cosθ=adjacenthypotenusesinθ=oppositehypotenuse \cos\theta = \frac{\text{adjacent}}{\text{hypotenuse}} \qquad \sin\theta = \frac{\text{opposite}}{\text{hypotenuse}}

Making the connection with triangles allows us to calculate cosθ\cos\theta and sinθ\sin\theta by exploiting the Pythagorean theorem, at least for 0θ<90;0\le \theta < 90^\circ; one can treat the general case by combining this with the identities cos(θ+90)=sinθ,\cos(\theta+90^\circ) = -\sin\theta, sin(θ+90)=cosθ\sin(\theta+90^\circ) = \cos\theta (look at the diagram to convince yourself of these). In particular, the Pythagorean theorem implies that cos2θ+sin2θ=1\cos^2\theta + \sin^2\theta = 1 for all θ;\theta; 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 rr and angle θ\theta has length rθr\theta when θ\theta is measured in radians.

1 rad
The curved edge has the same length as the two straight lines.

We define the number 2π2\pi to be the number of radians in a circle (so that π\pi is half the number of radians in a circle); thus a circle of radius rr has circumference 2πr.2\pi r. We will soon learn a way to calculate these numbers, and find that 2π6.282\pi \approx 6.28 (and so π3.14\pi \approx 3.14). In particular, 1 radian=3602π degrees57.3.1\text{ radian} = \frac{360}{2\pi}\text{ degrees} \approx 57.3^\circ.

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=xx33!+\sin x = x - \frac{x^3}{3!} + \dotsb (which we'll encounter later) is only valid when xx 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 π=circumferencediameter;\pi = \frac{\text{circumference}}{\text{diameter}}; 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π=circumferenceradius.2\pi = \frac{\text{circumference}}{\text{radius}}. 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\cos and sin\sin of any angle. In the meantime, we can obtain exact values for a few standard angles:

θ\theta (Degrees)θ\theta (Radians)cosθ\cos\thetasinθ\sin\theta
00001100
3030\(\Twopi/12\)3/2\sqrt3/21/21/2
4545\(\Twopi/8\)2/2\sqrt2/22/2\sqrt2/2
6060\(\Twopi/6\)1/21/23/2\sqrt3/2
9090\(\Twopi/4\)0011

00^\circ and 9090^\circ are obvious. We worked out the case 4545^\circ in the video, using the Pythagorean theorem. You'll do the cases 3030^\circ and 6060^\circ in the exercises.

Exercises

  1. Compute cos\cos and sin\sin of 3030^\circ and 60.60^\circ.
  2. Define the tangent function by \(\tan\theta \Defeq \dfrac{\sin\theta}{\cos\theta};\) that is, tanθ\tan\theta is the slope of the line passing through the origin at angle θ.\theta. We define tan90=tan270=;\tan90^\circ = \tan270^\circ = \infty; while we will later encounter the symbols ++\infty and ,-\infty, this is an unsigned or projective infinity.

    Compute tanθ\tan\theta for the standard angles θ=0,30,45,60,90.\theta=0^\circ,\, 30^\circ,\, 45^\circ,\, 60^\circ,\, 90^\circ.

  3. Write down cos,\cos, sin,\sin, and tan\tan of the standard angles in every quadrant of the unit circle.
  4. 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} \]
  5. Once we've established \eqref{silly-formula}, we can derive all the usual trigonometric identities using algebraic manipulations, with no further geometric insight required.
    1. 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}\]
    2. Use \eqref{half-cos} and \eqref{half-sin} to derive the "double-angle formulas" \[\begin{align*} \cos(2\theta) &= \cos^2(\theta) - \sin^2(\theta)\\ &= 2\cos^2(\theta) - 1\\ &= 1 - 2\sin^2(\theta)\\ \sin(2\theta) &= 2\cos(\theta)\sin(\theta) \end{align*}\]
    3. Derive the "angle-difference" formulas \[\begin{align} \label{cos-diff} \cos(\alpha-\beta) &= \cos(\alpha)\cos(\beta) + \sin(\alpha)\sin(\beta)\\ \label{sin-diff} \sin(\alpha-\beta) &= \sin(\alpha)\cos(\beta) - \cos(\alpha)\sin(\beta) \end{align}\] and the "angle-sum" formulas \[\begin{align} \label{cos-sum} \cos(\alpha+\beta) &= \cos(\alpha)\cos(\beta) - \sin(\alpha)\sin(\beta)\\ \label{sin-sum} \sin(\alpha+\beta) &= \sin(\alpha)\cos(\beta) + \cos(\alpha)\sin(\beta) \end{align}\] These are sometimes stated in combined form \[\begin{align*} \cos(\alpha\pm\beta) &= \cos(\alpha)\cos(\beta) \mp \sin(\alpha)\sin(\beta)\\ \sin(\alpha\pm\beta) &= \sin(\alpha)\cos(\beta) \pm \cos(\alpha)\sin(\beta) \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\cos and sin\sin are continuous (a notion we will explore in great detail later)—gives a general algorithm for computing cos\cos and sin\sin.