# An algebraic approach to the law of sines

19 Nov 2018A visual way of expressing that three vectors,

, , and , form a triangle isand an algebraic way is

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,

, played an important role. In understanding the law of sines, the wedge product of two vectors, , 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.:

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

and in a picture, it is

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

parallelogram. If the wedge product at each vertex is to be consistent, we must haveIf 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

, and the parallelogram area interpretation supports this:#### 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)..

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 . and represent scalars (real numbers), and lower case roman letters like , , , , and represent vectors.

#### 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:

When you wedge

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

. 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,

and , of two vectors and and the angle between them, , you can compute the wedge product of the vectors:where

represents a unit plane segment. You can think of as a square spanned by two perpendicular unit vectors, and , in the same plane as and : .In terms of triangles, the angle between two vectors,

, is an exterior angle. In classical trigonometry, it’s more common to consider interior angles. But the of an exterior angle and the of the corresponding interior angle are equal, so for the wedge product, the distinction isn’t so important. Here’s the relationship.Since

We can see why this formula works by considering the projection of

onto a line perpendicular to . Call this projected vector . The parallelogram areas and are equal by a simple dissection argument: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

and are a leg and the hypotenuse of a right triangle respectively, their lengths are related byand, because

and are perpendicular and so span a rectangle,so

#### 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.:

Compute:

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:

From anti-commutativity, we know that

so that the first and last terms vanish, and . Using these givesAnd finally, collecting terms gives

The wedge product of any two vectors representable as weighted sums of

and will always be proportional to like this. Using exactly the same steps, we can work out the general coordinate formula.Given*basis*, and in this basis, and are the coordinates of , and and are the coordinates of . and are a

then

and if In 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.

and are perpendicular unit vectors so that , then this is### 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

wedging both sides with

givesUsing anti-commutativity

this equation reduces to

A similar simplification of

gives

and so we have the 3-way equality

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.

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:

and then divide each term by

: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

produces another equivalent version of the law of sines that does have an interesting geometric interpretation:where I have tried and not yet succeeded at coming up with any geometric intuition about why a factor of : connects the area of a triangle with the radius of its circumcircle. I’d be grateful for any leads.

is equal to the radius of the circle that circumscribes the triangle (that is, that passes through each of its vertices)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

or where the sides are parallel and so the triangle sits on a single line, without having to worry about dividing by .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

, then the third side must also be parallel to these two.If the wedge product of two vectors is zero,

, then the vectors are proportional to one another, , and the lines that the vectors span are parallel, . So here are 3 ways of saying the same thing in different languages:### Conclusion

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

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

, square both sides), and how to get the law of sines using the wedge product (wedge both sides with , 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.