super simple way to solve linear systems of equations:
start with a set of linear equations. for this example the following will do
3x y = 5
y z = 4
x - y 2z = 8
convert each equation to a homogeneous vector representation
3x y = 5 --> 3x y - 5w
y z = 4 --> y z - 4w
x - y 2z = 8 --> x - y 2z - 8w
next, we need the exterior product. the exterior product is pretty easy once you get the hang of it. you write it like a ∧ b. there are just a few basic rules of the wedge we need.
1. a basis vector wedged with itself is zero. x ∧ x = 0.
2. you can flip the operands if you negate. x ∧ y = - y ∧ x. 3. it distributes over addition. a ∧ (b c) = a ∧ b a ∧ c. 4. scalars factor out. x ∧ 4 y = 4 (x ∧ y).
these are all the properties we will need. continuing from earlier, join all of our equations using the wedge product.
(3x y -5w) ∧ (y z - 4w) ∧ (x - y 2z - 8w)
now reduce using the rules of the wedge product the normal rules of a vector space. this part is tedious, so i'll just show off the first multiplication
(3x y -5w) ∧ (y z - 4w)
=
3x∧y 3x∧z - 12x∧w
y∧y y∧z - 4y∧w
- 5w∧y - 5w∧z 20w∧w
y∧y and w∧w turn in to zero. and we can swap some of the wedge products, adding in minus signs, so that we can group terms together. after all this we end up with
3x∧y 3x∧z - 12x∧w y∧z y∧w 5z∧w
once we wedge this term with the remaining term, x - y 2z - 8w, and simplify (left as an exercise for the reader), we get the following
10x∧y∧z - 35 x∧y∧w 5x∧z∧w - 15y∧z∧w
the final thing we need to calculate for this expression is the dual. the dual is traditionally written like ⋆v. the dual of a wedge product v is another wedge product w, such that v∧w equals the wedge of all of our basis vectors in ascending order. in our case this is x∧y∧z∧w.
to find the dual of a particular wedge product, say z∧x, we can solve this equation using the swapping rule for the wedge
z∧x∧⋆(z∧x) = x∧y∧z∧w
z∧x∧⋆(z∧x)= -x∧z∧y∧w
z∧x∧⋆(z∧x)= z∧x∧y∧w
x∧⋆(z∧x)= x∧y∧w
⋆(z∧x)= y∧w
the dual also distributes over addition. if we compute the dual for the term
⋆(10x∧y∧z - 35 x∧y∧z 5x∧y∧w - 15y∧z∧w)
we get the result
-10w - 35z - 5y - 15x
or in a more familiar order
-15x - 5y - 35z - 10w
final step, we homogenize. make it so the coefficient in front of the w is 1. to do this we divide the whole term by the coefficient in front of the w, -10, and are left with
3/2x 1/2y 7/2z w
reading off the x, y, and z coefficients of the result we get the solution to the linear system.
to summarize: take your linear system. put it in homogeneous coordinates. wedge those vectors together. reduce them using the rules of vector and wedge arithmetic. take the dual. homogenize. read off the values.
-------------------------------
i like this approach cuz it is so simple and algebraic. just the normal rules for vector arithmetic, plus the fairly minor addition of the wedge product (which has a lot of uses elsewhere! it is worth learning!), are enough to solve linear systems of equations.
i kind of wish this is how i had learned linear algebra in school. gaussian elimination is fine, but i feel like it requires too much creativity. i don't wanna think about which rows to mash together. i wanna just rewrite over and over and over again.
btw this approach fails in predictable ways if the system is under or over constrained. i think. if several constraints are linearly dependent, when they all get wedged together they wedge to 0. and 0 wedged with anything else is 0. so the whole system becomes 0. this is one condition that can be checked. the other is when the system is inconsistent, like you have x = 2 and x = 4 as equations. in this case it appears that the coefficient of the homogeneous coordinate, w, becomes zero. this prevents us from homogenizing the system back to normal cuz you cant divide by zero.
i don't totally know for sure that this is how things work, that's just what ive seen messing around with a lil toy implementation. don't got formal proofs to the effect.
-------------------------------
i think there is some kind of good geometric intuition hiding under the hood here somewhere. linear equations are like hyperplanes or something, and the wedge product is a well known way to intersect geometric objects. the way the homogeneous coordinate behaves is basically how it works in projective geometry too. when the homogeneous coordinate is zero, this is algebraically the same condition as a "point at infinity" in projective geometry. somehow the idea that infinity ties to the impossibility of satisfying a linear system, idk that seems right.
-------------------------------
i don't have anything for a final section idk why i added another section delimiter
-------------------------------
alright here is an attempt at a conclusion. linear systems of equations show up all over the place. they are so basic and solvers are so ubiquitous that it is easy to avoid thinking about the fundamentals. especially when the fundamentals are kind of awkward to deal with.
i think it is pretty neat that there is such a mechanical, brainless way to solve these systems of equations. now if you are stuck on a deserted island and you forget how to invert a matrix, you can rest easy knowing how to use the wedge product as your backup.