Triangle Trigonometry and Vectors

Study Sheet

Triangle Trigonometry and Vectors

Laws of Sines and Cosines, area, vectors, dot products, and applications

The Law of Sines

Throughout, a triangle is labeled so that side aa is opposite angle AA, side bb is opposite BB, and side cc is opposite CC. Decimal answers are rounded to the nearest tenth (angles in degrees, lengths in the given units) unless stated otherwise.

Opposite, adjacent and hypotenuse are named from the angle.

Concept
Law of Sines

For any triangle ABCABC,

sinAa=sinBb=sinCc.\frac{\sin A}{a}=\frac{\sin B}{b}=\frac{\sin C}{c}.

Use it when you know AAS, ASA, or SSA (an angle and its opposite side, plus one more piece).

Reminder — Law of Sines:asinA=bsinB=csinC\frac{a}{\sin A}=\frac{b}{\sin B}=\frac{c}{\sin C}
Example
AAS: solve the triangle

Given A=35A=35^\circ, B=65B=65^\circ, a=12a=12. Then C=1803565=80C=180^\circ-35^\circ-65^\circ=80^\circ.

b=asinBsinA=12sin65sin35=12(0.9063)0.573619.0,c=asinCsinA=12sin80sin3520.6.b=\frac{a\sin B}{\sin A}=\frac{12\sin 65^\circ}{\sin 35^\circ}=\frac{12(0.9063)}{0.5736}\approx 19.0,\qquad c=\frac{a\sin C}{\sin A}=\frac{12\sin 80^\circ}{\sin 35^\circ}\approx 20.6.

The ambiguous case (SSA): 0, 1, or 2 triangles

When you are given two sides and an angle opposite one of them (say aa, bb, and AA), the height from CC to the base is h=bsinAh=b\sin A. Compare aa with hh and bb:

Tip

AA acute: if a<bsinAa<b\sin A no triangle; if a=bsinAa=b\sin A one (right) triangle; if bsinA<a<bb\sin A<a<b two triangles; if aba\ge b one triangle.   AA obtuse: one triangle if a>ba>b, otherwise none.

Example
Full ambiguous case: two triangles

Solve the triangle with a=8a=8, b=10b=10, A=40A=40^\circ. Since AA is acute and bsinA=10sin406.43b\sin A=10\sin 40^\circ\approx 6.43, and 6.43<8<106.43<8<10, there are two triangles.

sinB=bsinAa=10sin408=6.427980.8035    B53.5  or  B18053.5=126.5.\sin B=\frac{b\sin A}{a}=\frac{10\sin 40^\circ}{8}=\frac{6.4279}{8}\approx 0.8035 \;\Rightarrow\; B\approx 53.5^\circ \ \text{ or }\ B'\approx 180^\circ-53.5^\circ=126.5^\circ.

Triangle 1: B53.5B\approx 53.5^\circ, so C=1804053.5=86.5C=180^\circ-40^\circ-53.5^\circ=86.5^\circ and c=asinCsinA=8sin86.5sin4012.4c=\dfrac{a\sin C}{\sin A}=\dfrac{8\sin 86.5^\circ}{\sin 40^\circ}\approx 12.4. Triangle 2: B126.5B'\approx 126.5^\circ, so C=18040126.5=13.5C'=180^\circ-40^\circ-126.5^\circ=13.5^\circ and c=8sin13.5sin402.9c'=\dfrac{8\sin 13.5^\circ}{\sin 40^\circ}\approx 2.9.

The Law of Cosines

Concept
Law of Cosines
θ°adjopphyp

For any triangle ABCABC,

a2=b2+c22bccosA,b2=a2+c22accosB,c2=a2+b22abcosC.a^2=b^2+c^2-2bc\cos A,\qquad b^2=a^2+c^2-2ac\cos B,\qquad c^2=a^2+b^2-2ab\cos C.

Use it for SAS (find the third side) or SSS (find any angle). Solving for an angle: cosC=a2+b2c22ab\cos C=\dfrac{a^2+b^2-c^2}{2ab}.

Opposite, adjacent and hypotenuse are named from the angle.

Reminder — Law of Cosines:c2=a2+b22abcosCc^{2}=a^{2}+b^{2}-2ab\cos C
Example
SAS then SSS

SAS: a=5a=5, b=7b=7, C=45C=45^\circ. Then c2=52+722(5)(7)cos45=7470(0.7071)24.50c^2=5^2+7^2-2(5)(7)\cos 45^\circ=74-70(0.7071)\approx 24.50, so c4.9c\approx 4.9. SSS: a=7a=7, b=8b=8, c=9c=9. The largest angle is CC: cosC=72+82922(7)(8)=32112=0.2857\cos C=\dfrac{7^2+8^2-9^2}{2(7)(8)}=\dfrac{32}{112}=0.2857, so C73.4C\approx 73.4^\circ.

Tip

Tip: The Law of Cosines has no ambiguity. When SSS or SAS is given, start there; only switch to the Law of Sines once you have a side and its opposite angle. To avoid the ambiguous case entirely, find the largest unknown angle with the Law of Cosines first.

Area of a Triangle

Concept
Two area formulas

SAS formula (two sides and the included angle):

Area=12absinC=12bcsinA=12acsinB.\text{Area}=\tfrac12 ab\sin C=\tfrac12 bc\sin A=\tfrac12 ac\sin B.

Heron's formula (three sides), with semiperimeter s=a+b+c2s=\dfrac{a+b+c}{2}:

Area=s(sa)(sb)(sc).\text{Area}=\sqrt{s(s-a)(s-b)(s-c)}.
Example
Both formulas

SAS: a=5a=5, b=7b=7, C=45C=45^\circ: Area =12(5)(7)sin45=17.5(0.7071)12.4=\tfrac12(5)(7)\sin 45^\circ=17.5(0.7071)\approx 12.4 square units. Heron: a=7a=7, b=8b=8, c=9c=9: s=7+8+92=12s=\tfrac{7+8+9}{2}=12, so Area =12(5)(4)(3)=72026.8=\sqrt{12(5)(4)(3)}=\sqrt{720}\approx 26.8 square units.

Vectors: Component Form and Operations

Concept
Vector basics
θ°adjopphyp

A vector in component form is u=a,b\vec u=\langle a,b\rangle.

  • [leftmargin=6mm]
  • Magnitude: u=a2+b2\|\vec u\|=\sqrt{a^2+b^2}.
  • Direction angle θ\theta (from the positive xx-axis): tanθ=ba\tan\theta=\dfrac{b}{a}; place θ\theta in the correct quadrant.
  • Add / subtract: a,b±c,d=a±c,  b±d\langle a,b\rangle\pm\langle c,d\rangle=\langle a\pm c,\;b\pm d\rangle.
  • Scalar multiple: ka,b=ka,kbk\langle a,b\rangle=\langle ka,kb\rangle.
  • Unit vector in the direction of u\vec u: u^=1uu\hat u=\dfrac{1}{\|\vec u\|}\vec u.
  • Polar / trig form: u=ucosθ,sinθ\vec u=\|\vec u\|\,\langle\cos\theta,\sin\theta\rangle.

Opposite, adjacent and hypotenuse are named from the angle.

Example
Components, magnitude, direction, unit vector

Let u=3,4\vec u=\langle 3,4\rangle. Then u=32+42=5\|\vec u\|=\sqrt{3^2+4^2}=5, direction θ=tan1 ⁣4353.1\theta=\tan^{-1}\!\frac{4}{3}\approx 53.1^\circ (Quadrant I), and u^=153,4=0.6,0.8\hat u=\frac{1}{5}\langle 3,4\rangle=\langle 0.6,0.8\rangle. In trig form, u=5cos53.1,sin53.1\vec u=5\langle\cos 53.1^\circ,\sin 53.1^\circ\rangle. For v=2,5\vec v=\langle -2,5\rangle: v=295.4\|\vec v\|=\sqrt{29}\approx 5.4 and the reference angle is tan1 ⁣5268.2\tan^{-1}\!\frac{5}{2}\approx 68.2^\circ; since v\vec v is in Quadrant II, θ18068.2=111.8\theta\approx 180^\circ-68.2^\circ=111.8^\circ.

The Dot Product, Angle, Projection, and Work

Concept
Dot product and its uses

For u=a,b\vec u=\langle a,b\rangle and v=c,d\vec v=\langle c,d\rangle:

uv=ac+bd=uvcosθ.\vec u\cdot\vec v=ac+bd=\|\vec u\|\,\|\vec v\|\cos\theta.
  • [leftmargin=6mm]
  • Angle between: cosθ=uvuv\cos\theta=\dfrac{\vec u\cdot\vec v}{\|\vec u\|\,\|\vec v\|}.
  • Orthogonal (perpendicular) exactly when uv=0\vec u\cdot\vec v=0.
  • Projection of u\vec u onto v\vec v:  projvu=(uvv2)v\ \operatorname{proj}_{\vec v}\vec u=\left(\dfrac{\vec u\cdot\vec v}{\|\vec v\|^2}\right)\vec v.
  • Work done by a constant force F\vec F over displacement d\vec d:  W=Fd\ W=\vec F\cdot\vec d.
Example
Full dot-product and projection

Let u=3,4\vec u=\langle 3,4\rangle and v=5,2\vec v=\langle 5,2\rangle.

uv=3(5)+4(2)=23,u=5,v=295.385.\vec u\cdot\vec v=3(5)+4(2)=23,\qquad \|\vec u\|=5,\quad \|\vec v\|=\sqrt{29}\approx 5.385.

Angle: cosθ=23529=2326.930.8541\cos\theta=\dfrac{23}{5\sqrt{29}}=\dfrac{23}{26.93}\approx 0.8541, so θ31.3\theta\approx 31.3^\circ (not orthogonal, since uv0\vec u\cdot\vec v\neq 0). Projection of u\vec u onto v\vec v:

projvu=23(29)25,2=23295,2=11529,46293.97,1.59.\operatorname{proj}_{\vec v}\vec u=\frac{23}{(\sqrt{29})^2}\langle 5,2\rangle=\frac{23}{29}\langle 5,2\rangle=\left\langle \tfrac{115}{29},\tfrac{46}{29}\right\rangle\approx\langle 3.97,1.59\rangle.

Work: A force F=4,3\vec F=\langle 4,3\rangle N moving an object along d=10,0\vec d=\langle 10,0\rangle m does W=Fd=4(10)+3(0)=40W=\vec F\cdot\vec d=4(10)+3(0)=40 joules.

Tip

Tip: uv>0\vec u\cdot\vec v>0 means the angle is acute; uv<0\vec u\cdot\vec v<0 means obtuse; uv=0\vec u\cdot\vec v=0 means perpendicular. The projection is a vector along v\vec v; the scalar uvv\dfrac{\vec u\cdot\vec v}{\|\vec v\|} is its signed length (the “component of u\vec u along v\vec v”).

Applications: Bearings, Forces, and Navigation

Concept
Setting up applied problems
θ°adjopphyp

Bearings are measured clockwise from north (e.g. N4040^\circE is 4040^\circ east of due north). To convert a compass bearing to a standard direction angle from the positive xx-axis (east), use θstd=90(bearing east of north)\theta_{\text{std}}=90^\circ-(\text{bearing east of north}). Resultant force / velocity: write each vector in components Fcosθ, Fsinθ\langle\|\vec F\|\cos\theta,\ \|\vec F\|\sin\theta\rangle, add them, then find the magnitude and direction of the sum.

Opposite, adjacent and hypotenuse are named from the angle.

Example
Resultant force

Two forces act on a point: F1=50\vec F_1=50 N at 3030^\circ and F2=40\vec F_2=40 N at 120120^\circ (standard angles).

F1=50cos30,50sin3043.3,25.0,F2=40cos120,40sin120=20.0,34.6.\vec F_1=\langle 50\cos 30^\circ,50\sin 30^\circ\rangle\approx\langle 43.3,25.0\rangle,\quad \vec F_2=\langle 40\cos 120^\circ,40\sin 120^\circ\rangle=\langle -20.0,34.6\rangle.

Resultant R=23.3,59.6\vec R=\langle 23.3,59.6\rangle, so R=23.32+59.6264.0\|\vec R\|=\sqrt{23.3^2+59.6^2}\approx 64.0 N at θ=tan1 ⁣59.623.368.6\theta=\tan^{-1}\!\frac{59.6}{23.3}\approx 68.6^\circ.

Example
Navigation with the Law of Cosines

A plane flies 120120 mi on bearing N5050^\circE, then turns and flies 9090 mi on bearing S7070^\circE. At the turning point the angle between the reversed first leg (S5050^\circW) and the new heading (S7070^\circE) is 50+70=12050^\circ+70^\circ=120^\circ. Its distance from the start is

d=1202+9022(120)(90)cos120=14400+8100+10800=33300182.5 mi.d=\sqrt{120^2+90^2-2(120)(90)\cos 120^\circ}=\sqrt{14400+8100+10800}=\sqrt{33300}\approx 182.5\ \text{mi}.

Going Deeper: Advanced Triangle Trig & Vectors

Concept
Stewart's Theorem: cevians, medians, and bisectors
θ°adjopphyp

A cevian is a segment from a vertex to a point on the opposite side. Let a cevian from AA meet side aa (i.e. BCBC) at a point that splits it into segments mm (adjacent to BB) and nn (adjacent to CC), with length dd. Then Stewart's Theorem says

b2m+c2n=a(d2+mn),a=m+n.b^2 m + c^2 n = a\,(d^2 + mn),\qquad a=m+n.

A mnemonic: “a man and his dad put a bomb in the sink\Rightarrow man+dad=bmb+cncman+dad=bmb+cnc, i.e. man+dad=bmb+cncm\,a\,n + d\,a\,d = b\,m\,b + c\,n\,c. Two special cevians follow at once:

  • [leftmargin=6mm]
  • Median to side aa (m=n=a2m=n=\tfrac a2):  ma=122b2+2c2a2.\ m_a=\dfrac12\sqrt{2b^2+2c^2-a^2}.
  • Angle bisector from AA (it divides aa in the ratio c:bc:b, so m=acb+cm=\dfrac{ac}{b+c}, n=abb+cn=\dfrac{ab}{b+c}):  ta=bc ⁣[1(ab+c)2].\ t_a=\sqrt{bc\!\left[1-\left(\dfrac{a}{b+c}\right)^2\right]}.

Opposite, adjacent and hypotenuse are named from the angle.

Example
Median and angle-bisector lengths

Let a=7a=7, b=8b=8, c=9c=9 (so side a=BCa=BC, and the cevians issue from AA). Median to aa:  ma=122(82)+2(92)72=12128+16249=122417.8.\ m_a=\tfrac12\sqrt{2(8^2)+2(9^2)-7^2}=\tfrac12\sqrt{128+162-49}=\tfrac12\sqrt{241}\approx 7.8. Check with Stewart (m=n=3.5m=n=3.5, d=mad=m_a): 82(3.5)+92(3.5)=7(d2+3.52)507.5=7d2+85.75d2=60.25\,8^2(3.5)+9^2(3.5)=7(d^2+3.5^2)\Rightarrow 507.5=7d^2+85.75\Rightarrow d^2=60.25, so d7.8d\approx 7.8. ✓ Angle bisector from AA:  ta=(8)(9) ⁣[1(78+9)2]=72(10.1696)=59.797.7.\ t_a=\sqrt{(8)(9)\!\left[1-\left(\dfrac{7}{8+9}\right)^2\right]}=\sqrt{72\,(1-0.1696)}=\sqrt{59.79}\approx 7.7.

Concept
The ambiguous case as a parameter count

Solving a triangle means finding all 66 parts from 33 given ones. “How many triangles” is really “how many solutions does the given data admit,” and it is governed by how many pieces of data are fixed versus free:

  • [leftmargin=6mm]
  • SSS, SAS, ASA, AAS each pin down a triangle by a rigid congruence: 00 free parameters \Rightarrow exactly one triangle (when the data are geometrically possible).
  • SSA is not a congruence: fixing a,b,Aa,b,A leaves the position of the third vertex to be found from sinB=bsinAa\sin B=\dfrac{b\sin A}{a}. That equation is quadratic-like in outcome because sinB=sin(180B)\sin B=\sin(180^\circ-B), so it can yield 00, 11, or 22 admissible values of BB.
  • AAA fixes only the shape (angles), leaving a 11-parameter family of similar triangles (scale is free): infinitely many.

The count is thus a solution count of sinB=k\sin B=k subject to A+B<180A+B<180^\circ: two solutions when 0<k<10<k<1 and both BB values keep the angle sum valid; one when k=1k=1 or when the obtuse BB' is rejected; none when k>1k>1.

Concept
Area by several methods, and area ratios

The same triangle's area can be written many ways; equating them yields identities.

K=12absinC=s(sa)(sb)(sc)=rs=abc4R,K=\tfrac12 ab\sin C=\sqrt{s(s-a)(s-b)(s-c)}=rs=\frac{abc}{4R},

where s=a+b+c2s=\tfrac{a+b+c}{2}, rr is the inradius, and RR is the circumradius. Useful ratio facts:

  • [leftmargin=6mm]
  • A median splits a triangle into two triangles of equal area (equal bases a2\tfrac a2, shared height).
  • A cevian dividing the base in ratio m:nm:n splits the area in the same ratio m:nm:n.
  • Two triangles sharing an angle θ\theta have areas in ratio K1K2=a1b1a2b2\dfrac{K_1}{K_2}=\dfrac{a_1 b_1}{a_2 b_2} (from 12absinθ\tfrac12 ab\sin\theta).
  • Similar triangles with side ratio kk have area ratio k2k^2.
Example
One area, four ways

For a=7a=7, b=8b=8, c=9c=9 we found Heron's area K=72026.83K=\sqrt{720}\approx 26.83. Then:

r=Ks=26.83122.2,R=abc4K=5044(26.83)4.7.r=\frac{K}{s}=\frac{26.83}{12}\approx 2.2,\qquad R=\frac{abc}{4K}=\frac{504}{4(26.83)}\approx 4.7.

SAS cross-check: first cosC=72+82922(7)(8)=0.2857sinC0.9583\cos C=\dfrac{7^2+8^2-9^2}{2(7)(8)}=0.2857\Rightarrow \sin C\approx 0.9583, so K=12(7)(8)(0.9583)26.8K=\tfrac12(7)(8)(0.9583)\approx 26.8. ✓ All four formulas agree.

Concept
Parallelogram law: u±v\|\vec u\pm\vec v\| from magnitudes and the angle

If θ\theta is the angle between u\vec u and v\vec v, then because u±v2=(u±v)(u±v)\|\vec u\pm\vec v\|^2=(\vec u\pm\vec v)\cdot(\vec u\pm\vec v),

u+v2=u2+v2+2uvcosθ,uv2=u2+v22uvcosθ.\|\vec u+\vec v\|^2=\|\vec u\|^2+\|\vec v\|^2+2\|\vec u\|\|\vec v\|\cos\theta,\qquad \|\vec u-\vec v\|^2=\|\vec u\|^2+\|\vec v\|^2-2\|\vec u\|\|\vec v\|\cos\theta.

These are just the Law of Cosines on the triangle formed by the two vectors. Adding them gives the parallelogram law u+v2+uv2=2u2+2v2\|\vec u+\vec v\|^2+\|\vec u-\vec v\|^2=2\|\vec u\|^2+2\|\vec v\|^2 (the two diagonals determine the sides).

Example
Resultant and difference without components

Two forces of magnitude u=6\|\vec u\|=6 and v=10\|\vec v\|=10 meet at an angle of θ=60\theta=60^\circ.

u+v=62+102+2(6)(10)cos60=36+100+60=196=14.0,\|\vec u+\vec v\|=\sqrt{6^2+10^2+2(6)(10)\cos 60^\circ}=\sqrt{36+100+60}=\sqrt{196}=14.0,
uv=36+10060=768.7.\|\vec u-\vec v\|=\sqrt{36+100-60}=\sqrt{76}\approx 8.7.

Check: 142+8.72196+75.7=271.714^2+8.7^2\approx 196+75.7=271.7 and 2(62)+2(102)=2722(6^2)+2(10^2)=272, confirming the parallelogram law (rounding). The direction of u+v\vec u+\vec v relative to u\vec u is ϕ=tan1 ⁣10sin606+10cos60=tan1 ⁣8.661138.2.\phi=\tan^{-1}\!\dfrac{10\sin 60^\circ}{6+10\cos 60^\circ}=\tan^{-1}\!\dfrac{8.66}{11}\approx 38.2^\circ.

Concept
Vector proofs: perpendicularity and right triangles

The dot product turns geometry into algebra. Key tools:

  • [leftmargin=6mm]
  • Two vectors are perpendicular iff uv=0\vec u\cdot\vec v=0.
  • Triangle PQRPQR has a right angle at QQ iff QPQR=0\overrightarrow{QP}\cdot\overrightarrow{QR}=0.
  • To show a quadrilateral's diagonals are perpendicular, form them as vectors and show their dot product is 00.
  • An angle inscribed in a semicircle is right: if OO is the center and PP is on the circle, then PAPB=0\overrightarrow{PA}\cdot\overrightarrow{PB}=0 where ABAB is a diameter.
Example
Prove a triangle is right

Let P=(1,2)P=(1,2), Q=(4,3)Q=(4,3), R=(3,6)R=(3,6). Test the angle at QQ:

QP=14,23=3,1,QR=34,63=1,3.\overrightarrow{QP}=\langle 1-4,\,2-3\rangle=\langle -3,-1\rangle,\qquad \overrightarrow{QR}=\langle 3-4,\,6-3\rangle=\langle -1,3\rangle.
QPQR=(3)(1)+(1)(3)=33=0,\overrightarrow{QP}\cdot\overrightarrow{QR}=(-3)(-1)+(-1)(3)=3-3=0,

so the angle at QQ is exactly 9090^\circ and PQR\triangle PQR is right. (Equivalently, verify PQ2+QR2=PR2\|PQ\|^2+\|QR\|^2=\|PR\|^2: 10+10=2010+10=20. ✓)

Example
Projection and work in context

A wagon is pulled by a rope with force F=25,15\vec F=\langle 25,15\rangle N while it rolls along level ground in the direction d=30,0\vec d=\langle 30,0\rangle m.

W=Fd=25(30)+15(0)=750 joules.W=\vec F\cdot\vec d=25(30)+15(0)=750\ \text{joules}.

Only the component of F\vec F along the motion does work:  compdF=Fdd=75030=25\ \operatorname{comp}_{\vec d}\vec F=\dfrac{\vec F\cdot\vec d}{\|\vec d\|}=\dfrac{750}{30}=25 N, and indeed 25 N×30 m=75025\ \text{N}\times 30\ \text{m}=750 J. The vertical part 0,15\langle 0,15\rangle (perpendicular to the motion) does no work. If instead the rope makes angle α\alpha with the ground and pulls with force FF, then W=FdcosαW=Fd\cos\alpha.

Tip

Circumradius and inradius links. From K=abc4RK=\dfrac{abc}{4R} and the Law of Sines,  2R=asinA=bsinB=csinC\ 2R=\dfrac{a}{\sin A}=\dfrac{b}{\sin B}=\dfrac{c}{\sin C} (so the common ratio in the Law of Sines is the diameter of the circumscribed circle). From K=rsK=rs, the inradius is r=Ksr=\dfrac{K}{s}. Together they give handy identities such as r=4RsinA2sinB2sinC2r=4R\sin\tfrac A2\sin\tfrac B2\sin\tfrac C2 and a=2RsinAa=2R\sin A. Rounding convention as above: lengths and radii to the nearest tenth, angles to the nearest tenth of a degree.

Formulas, Proofs & Tips

Tip
Law of Sines
asinA=bsinB=csinC\frac{a}{\sin A}=\frac{b}{\sin B}=\frac{c}{\sin C}

What it means. In any triangle each side is proportional to the sine of its opposite angle.

Example. asin30=10sin90a=1012=5\dfrac{a}{\sin 30^\circ}=\dfrac{10}{\sin 90^\circ}\Rightarrow a=10\cdot\tfrac12=5.

Why it works. Drop the height hh to side cc. Then h=bsinAh=b\sin A from one right triangle and h=asinBh=a\sin B from the other, so bsinA=asinBb\sin A=a\sin B, which rearranges to asinA=bsinB\tfrac{a}{\sin A}=\tfrac{b}{\sin B}.

Tip. Use it when you have an angle paired with its opposite side (AAS, ASA, SSA). The SSA case can give two triangles — check whether a second angle also fits.

Tip
Law of Cosines
c2=a2+b22abcosCc^{2}=a^{2}+b^{2}-2ab\cos C

What it means. Pythagoras with a correction term for the angle not being right.

Example. Sides 3,43,4 with included angle 6060^\circ: c2=9+1623412=13c^2=9+16-2\cdot3\cdot4\cdot\tfrac12=13.

Why it works. Place CC at the origin with aa along the xx-axis. The other vertex sits at (bcosC, bsinC)(b\cos C,\ b\sin C), and the distance formula to (a,0)(a,0) gives c2=(bcosCa)2+(bsinC)2c^2=(b\cos C-a)^2+(b\sin C)^2. Expanding and using sin2+cos2=1\sin^2+\cos^2=1 leaves a2+b22abcosCa^2+b^2-2ab\cos C.

Tip. When C=90C=90^\circ, cosC=0\cos C=0 and it collapses to a2+b2=c2a^2+b^2=c^2. Use it for SSS and SAS, where the Law of Sines cannot start.

Tip
The dot product
uv=u1v1+u2v2=uvcosθ\mathbf{u}\cdot\mathbf{v}=u_1v_1+u_2v_2=|\mathbf{u}||\mathbf{v}|\cos\theta

What it means. Multiply matching components and add; the result also measures how aligned the vectors are.

Example. (1,2)(3,4)=13+24=11(1,2)\cdot(3,4)=1\cdot3+2\cdot4=11.

Why it works. Apply the Law of Cosines to the triangle formed by u\mathbf u, v\mathbf v and vu\mathbf v-\mathbf u. Expanding vu2|\mathbf v-\mathbf u|^2 in components and comparing with u2+v22uvcosθ|\mathbf u|^2+|\mathbf v|^2-2|\mathbf u||\mathbf v|\cos\theta leaves exactly u1v1+u2v2=uvcosθu_1v_1+u_2v_2=|\mathbf u||\mathbf v|\cos\theta.

Tip. A dot product of 00 means the vectors are perpendicular — the fastest perpendicularity test there is.