Shape Operator

An algebraic approach to the law of sines

19 Nov 2018

A visual way of expressing that three vectors, a, b, and c, form a triangle is

A triangle with sides a, b, and c.

and an algebraic way is

a + b + c = 0

In a previous post, I showed how to generate the law of cosines from this vector equation—solve for c and square both sides—and that this simplifies to the Pythagorean theorem when two of the vectors are perpendicular.

In this post, I’ll show a similarly simple algebraic route to the law of sines.

In understanding the law of cosines, the dot product of two vectors, a \cdot b, played an important role. In understanding the law of sines, the wedge product of two vectors, a \wedge b, will play a similarly important role.

Properties of the wedge product

Let’s review what the wedge product is, since it’s probably less familiar than the dot product. Geometrically, the wedge product of two vectors represents the area of the parallelogram spanned by the two vectorsThere is a similar interpretation of the dot product as the area of a parallelogram discussed in Geometry, Algebra, and Intuition: instead of forming a parallelogram from the two vectors directly, the parallelogram is formed from one of the vectors and a copy of the other rotated 90 degrees. I’ll say more about the connection between these products another time.:

Wedge product of a and b represented as a parallelogram

Mathematically, the wedge product is a function that takes two vectors and produces a new kind of object called a bivector. Similarly to how a vector represents a magnitude and a direction, a bivector represents the size of an area and its directionIn one dimension, there are only two directions that a vector can have: positive or negative. In more dimensions, there are more possible directions. Similarly, in two dimensions, there are only two directions a bivector can have: positive or negative. In more dimensions, there are again more possible directions.. The wedge product is defined (more-or-less uniquely) as a product between vectors that is anti-commutative, linear, and associative. Let’s go over these properties one by one.

Anti-commutative:

Algebraically, anti-commutativity means

a \wedge b = - b \wedge a

and in a picture, it is

Parellelograms representing a wedge b and b wedge a have opposite area.

A plane region traversed clockwise is considered to have opposite directed area as the same region traversed counter-clockwise. The concept of negative area is useful for similar reasons that negative numbers are useful: the difference of two areas can continue to be represented geometrically even if the second area is bigger than the firstIn my opinion, the missing concept of sign/orientation for edges, areas, and angles is one of the biggest deficiencies of classical Greek Euclidean geometry. It leads to more special cases in theorems, like having to consider acute and obtuse angles separately in the inscribed angle theorem..

Consider the incoming and outgoing edges at each vertex in the diagram above, starting from the bottom right vertex of the a \wedge b parallelogram. If the wedge product at each vertex is to be consistent, we must have

a \wedge b = b \wedge (-a) = (-a) \wedge (-b) = (-b) \wedge a

If we’re allowed to pull the minus signs out in front of these products (and the next property says that we are), these equalities imply anti-commutativity.

Anti-commutativity also implies that any vector wedged with itself is 0, and the parallelogram area interpretation supports this:

a \wedge a = - a \wedge a = 0

Linear and distributive

Vectors can be added together to make new vectors, and the area of parallelograms spanned by vectors adds consistently with vector additionArrangements of parallelograms like this one often look like they’re depicting something in 3D, but all of the diagrams in this post are 2D diagrams. This diagram does also happen to work in 3D as long as you use the right interpretation of what it means to add areas in different planes (i.e. as long as you use directed areas represented as bivectors)..

(u + v ) \wedge w = u \wedge w + v \wedge w
Distributivity of the wedge product

Geometrically, this can be understood by dissection: cut a triangle from one edge of a parallelogram and glue it to the opposite edge. The resulting figure is the union of two parallelograms with the same total area.

Vectors can also be scaled, and the area of parallelograms spanned by vectors scales consistentlyHere and everywhere in the post I’m using the convention that greek letters like \alpha and \beta represent scalars (real numbers), and lower case roman letters like a, b, c, u, v and w represent vectors..

(\alpha u) \wedge (\beta v) = \alpha \beta (u \wedge v)

Associative

Wedging three vectors together represents the (directed) volume of the parallelepiped that they span, and associativity means that the order that we combine the vectors doesn’t matter:

(u \wedge v) \wedge w = u \wedge (v \wedge w)

When you wedge k different vectors together, the result is an object called a k-vector that represents a k-dimensional volume. Just as vectors represent the size and direction of a linear region, and bivectors represent the size and direction of a plane region, k-vectors represent the size and direction of a k-dimensional region.

In the remainder of this post, we’ll only consider vectors in the plane. Three vectors in the same plane can’t span any volume, and so their wedge product must be 0. This means we won’t make any use of associativity here. But it’s nice to know that the wedge product works consistently in any number of dimensions.

Relationship to lengths and angles

If you know the lengths, |a| and |b|, of two vectors a and b and the angle between them, \theta_{ab}, you can compute the wedge product of the vectors:

a \wedge b = |a| |b| \sin(\theta_{ab}) I

where I represents a unit plane segment. You can think of I as a square spanned by two perpendicular unit vectors, e_1 and e_2, in the same plane as a and b: I=e_1\wedge e_2.

Orthogonal unit vectors span a unit area.

In terms of triangles, the angle between two vectors, \theta_{ab}, is an exterior angle. In classical trigonometry, it’s more common to consider interior angles. But the \sin of an exterior angle and the \sin of the corresponding interior angle are equal, so for the wedge product, the distinction isn’t so important. Here’s the relationship.

Wedge product of a and b represented as a parallelogram

Since \sin \theta_{ab} = \sin C

\begin{aligned} a \wedge b &= |a| |b| \sin(\theta_{ab}) I \\ &= |a| |b| \sin(C) I \end{aligned}

We can see why this formula works by considering the projection of b onto a line perpendicular to a. Call this projected vector h. The parallelogram areas a \wedge b and a \wedge h are equal by a simple dissection argument:

Interior and exterior angles of a triangle

The rectangle on the right side of this diagram can be constructed by cutting a triangle from one edge of the parallelogram on the left side of the diagram and pasting it to the opposite edge, so the area of the two figures is equal.

Since h and b are a leg and the hypotenuse of a right triangle respectively, their lengths are related by

|h| = |b| \sin(C)

and, because a and h are perpendicular and so span a rectangle,

a \wedge h = |a| |h| I

so

a \wedge b = a \wedge h = |a| |b| \sin(C) I

Coordinates

If you know two vectors in terms of coordinates, you can compute their wedge product directly from the coordinates without going through lengths and angles. There’s a formula for this, but there’s no need to memorize it because it’s almost as simple to compute directly using properties like anti-commutativity and linearity. Let’s work out a concrete exampleA lot of literature about this kind of algebra is fairly abstract, and when I started reading about Geometric Algebra, it seemed useful for theory, but I wasn’t really sure how to calculate anything. Seeing a few calculations in terms of concrete coordinates gives you a reassuring feeling that the whole system might be grounded in reality after all.

At the other end of the spectrum, many introductory treatments of vectors choose to define products (like the dot product, cross product, or wedge product) in terms of either lengths and angles or coordinates. I can see the pedagogical value of this at a certain point, but eventually, I think it’s very useful to realize that all of these things can be (should be) defined in terms of algebraic properties like linearity, associativity, (anti-)commutativity, etc. Then you can prove the formulas for lengths and angles or coordinates, and rather than seeming like collections of symbols pulled out of a hat, they suddenly seem inevitable.
:

Wedge product in coordinates

Compute:

B = (3e_1 + e_2) \wedge (2e_1+4e_2)

First, use the distributive property to expand the product of sums into a sum of products, and linearity to pull the scalars to the front of each product:

\begin{aligned} B &= 3e_1 \wedge 2e_1 + 3e_1 \wedge 4e_2 + e_2 \wedge 2e_1 + e_2 \wedge 4e_2 \\ &= 6e_1 \wedge e_1 + 12e_1 \wedge e_2 + 2e_2 \wedge e_1 + 4e_2 \wedge e_2 \end{aligned}

From anti-commutativity, we know that e_1 \wedge e_1 = e_2 \wedge e_2 = 0 so that the first and last terms vanish, and e_2 \wedge e_1 = -e_1 \wedge e_2. Using these gives

\begin{aligned} B &= 12e_1 \wedge e_2 - 2e_1 \wedge e_2 \end{aligned}

And finally, collecting terms gives

\begin{aligned} B &= (12 - 2)e_1 \wedge e_2 \\ &= 10e_1 \wedge e_2 \end{aligned}

The wedge product of any two vectors representable as weighted sums of e_1 and e_2 will always be proportional to e_1 \wedge e_2 like this. Using exactly the same steps, we can work out the general coordinate formula.

Givene_1 and e_1 are a basis, and in this basis, \alpha_1 and \alpha_2 are the coordinates of a, and \beta_1 and \beta_2 are the coordinates of b.

\begin{aligned} a &= \alpha_1 e_1 + \alpha_2 e_2 \\ b &= \beta_1 e_1 + \beta_2 e_2 \end{aligned}

then

a \wedge b = \left(\alpha_1 \beta_2 - \alpha_2 \beta_1\right) e_1 \wedge e_2

and if e_1 and e_2 are perpendicular unit vectors so that e_1 \wedge e_2 = I, then this isIn more dimensions, to calculate the wedge product of several vectors in terms of coordinates, you can arrange the coordinates into a matrix and take its determinant. Perhaps you have learned about the connection of the determinant to (any-dimensional) volumes; the wedge product of several vectors has that same connection.

a \wedge b = \left(\alpha_1 \beta_2 - \alpha_2 \beta_1\right) I

Deriving the law of sines

With the wedge product at our disposal, we can now derive the law of sines with some simple algebra.

Given

a + b + c = 0

wedging both sides with a gives

a \wedge (a + b + c) = a \wedge a + a \wedge b + a \wedge c = 0

Using anti-commutativity

a \wedge a = 0,\quad a \wedge c = -c \wedge a

this equation reduces to

a \wedge b = c \wedge a

A similar simplification of

b \wedge (a + b + c) = 0

gives

a \wedge b = b \wedge c

and so we have the 3-way equality

a \wedge b = b \wedge c = c \wedge a

and we will see below that this is essentially equivalent to the law of sines.

In pictures of parallelograms, this isHere’s a Desmos Geometry construction that combines this figure and a couple others.

Equal-area parallelograms representing a wedge b, b wedge c, and c wedge a.

Geometrically, the areas of these parallelograms are equal because each of them is made out of two copies of the same triangle. This also implies that the area of the parallelograms is twice the area of the triangle. Notice that the parallelograms aren’t congruent, though, because the triangles are joined along different edges in each case.

It’s a short distance from here to the traditional law of sines. Just substitute in the “lengths and angles” expression for each wedge product:

\begin{aligned} a \wedge b &= |a| |b| \sin(C) I \\ b \wedge c &= |b| |c| \sin(A) I \\ c \wedge a &= |c| |a| \sin(B) I \\ \\ |a| |b| \sin(C) I =&\ |b| |c| \sin(A) I = |c| |a| \sin(B) I \end{aligned}

and then divide each term by |a| |b| |c| I:

\frac{\sin C}{|c|} = \frac{\sin A}{|a|} = \frac{\sin B}{|b|}

It’s hard to interpret this traditional form of the law of sines in terms of a figure because each of these terms has units of 1/length, and it’s not so clear how to draw anything with those units.

Taking the reciprocal of each term fixes the units. Then dividing through by 2 produces another equivalent version of the law of sines that does have an interesting geometric interpretation:

\frac{|c|}{2\sin C} = \frac{|a|}{2 \sin A} = \frac{|b|}{2 \sin B} = \rho

where \rho is equal to the radius of the circle that circumscribes the triangle (that is, that passes through each of its vertices)I have tried and not yet succeeded at coming up with any geometric intuition about why a factor of |a| |b| |c| connects the area of a triangle with the radius of its circumcircle. I’d be grateful for any leads.:

Radius of the triangles circumcircle

I won’t show that this is true, but if you want to try it, it’s a nice exercise in classical trigonometry. In any case, I think it’s clear that the geometric interpretation of the area form of the law of sines is simpler: three ways of calculating the area of the same triangle are equivalent (no circles needed).

Another nice thing about the area form of the law of sines is that it handles degeneracies, where one of the sides has length 0 or where the sides are parallel and so the triangle sits on a single line, without having to worry about dividing by 0.

For example, the area form of the law of sines says that if two sides of a triangle are parallel, so that their wedge product is 0, then the third side must also be parallel to these two.

\begin{aligned} a \wedge b &= b \wedge c \\ a \wedge b = 0 &\Leftrightarrow b \wedge c = 0 \\ \end{aligned}

If the wedge product of two vectors is zero, a \wedge b = 0, then the vectors are proportional to one another, a \propto b, and the lines that the vectors span are parallel, a \parallel b. So here are 3 ways of saying the same thing in different languages:

\begin{aligned} a \wedge b = 0 &\Leftrightarrow b \wedge c = 0 \\ a \propto b &\Leftrightarrow b \propto c \\ a \parallel b &\Leftrightarrow b \parallel c \\ \end{aligned}

Conclusion

My goal in this series of posts is to elaborate the idea that the simple vector equation

a + b + c = 0

contains all the facts of classical trigonometry, if you have a rich enough vector algebra to extract these facts.

So far, we’ve seen how to get the law of cosines using the dot product (solve for c, square both sides), and how to get the law of sines using the wedge product (wedge both sides with a, equate the remaining two terms).

Some of what remains to be said will require the geometric product, which unites the dot product and wedge product together.

Thank you to Jaime George for editing this post, and in particular, for helping me re-think the section on coordinates.