Proof of the law of cosines

preview_player
Показать описание
Using the Pythagorean theorem to prove the law of cosines.

#manim
Рекомендации по теме
Комментарии
Автор

consider a geometric algebra, where vectors square to their magnitude squared, and uv = -vu for orthogonal vectors. one property of this algebra is that:

uv = u•v + u^v

where u^v is the wedge product or outer product

now consider three vectors, a, b, and c, that represent the sides of a triangle s. t.:

c = a - b

for a visual, imagine a as an arrow pointing up and to the right, and b pointing down and to the right, a and b start at the same point, so c is a vector from the tip of b to the tip of a.

c = a - b

squaring both sides:

c**2 = a**2 - ab - ba + b**2
= a**2 + b**2 - (ab + ba)

ab + ba = a•b + a^b + b•a + b^a

the dot product is commutative and the outer product is anti-commutative (i.e. u^v = -v^u):

ab + ba = a•b + a^b + a•b - a^b
= 2 a • b

substituting back in:

c**2 = a**2 + b**2 - 2 a • b

the definition of a • b:

a • b = |a||b|cos t

where t is the angle between a and b (positive if going counter-clockwise, negative if going clockwise. for cosine it doesn't matter because cosine is an even function; cos(-x) = cos(x)):

c**2 = a**2 + b**2 - 2 |a| |b| cos t

so the law of cosines for free (remember that vectors square to their magnitude squared), just from the axioms of geometric algebra. but we can also get the law of sines for free:

another property of the wedge product is that u^u = 0 for all vectors u.

(side note: everyone knows the dot product that basically measures how "similar" two vectors are; if u and v are perpendicular, u•v = 0, and if they are parallel, u•v = |u| |v|. the wedge product is not as well known, but it basically does the opposite; it measures how DIFFERENT two vectors are: if u and v are perpendicular, |u^v| = |u| |v|, and if u and v are parallel, |u^v| = 0. the reason for the magnitude bars is because the wedge product actually had an extra factor in it usually called i, which you can think of as the unit square on the 2d plane.)

anyway, consider the same vectors representing the sides of a triangle:

a - b = c

lets call the angle opposite a: A, the angle opposite b: B, and the angle opposite c: C. now take the wedge product of both sides with a, keeping in mind a^a = 0 and the distributive property:

(a-b)^a = a^a-b^a = -b^a = a ^ b

RHS:

c^a = c^a

so:

a^b = c^a

the definition of the wedge product:

u ^ v = |u| |v| sin t i

where t is the angle between u and v (here, clockwise or counter-clockwise matters bc sine is an odd function):

|a| |b| sin C i = |c| |a| sin B i

we can divide both sides by |a| i:

|b| sin C = |c| sin B

|b|/sin(B) = |c|/sin(C)

sin(B)/|b| = sin(C)/|c|

which is the law of sines! the same argument can be used to derive the equality for sin(A)/|a|

wyboo
Автор

Very nice. Is the voice yours or is it generated? It sounds a bit robotic at times, but the fact I'm not sure is an indication it's really good if it's generated

ledues
Автор

This is awesome would you be willing to share the source code?

emerywoodsman