ThreeEquationsThreeUnknowns
Linear-Algebra tutorial · PySpark.in
1. Stepping Up to Three Dimensions
Everything we learned with two equations and two unknowns now scales up by one dimension. Three unknowns x, y, z and three equations give us a system that lives in three-dimensional space. The geometry is richer — instead of lines, we now draw planes — but the algebra follows exactly the same logic, just one dimension higher.
Here is the example Strang uses in Chapter 2 of his book:
x + 2y + 3z = 6 (Equation 1)
2x + 5y + 2z = 4 (Equation 2)
6x - 3y + z = 2 (Equation 3)
We are looking for numbers x, y, z that satisfy all three equations simultaneously. When the number of unknowns matches the number of equations — here 3 = 3 — there is usually exactly one solution. For this specific system, the solution is (x, y, z) = (0, 0, 2). Let us understand why through both the row picture and the column picture.
2. The Row Picture: Three Planes in Space
In the row picture, each equation describes a flat plane in three-dimensional space. A single linear equation ax + by + cz = d always defines a plane in 3D, as long as at least one of the coefficients is nonzero. So our three equations produce three planes. The solution is the point (or set of points) where all three planes meet.
One Equation Draws One Plane
The first equation x + 2y + 3z = 6 defines a plane in 3D space. The origin (0, 0, 0) does not satisfy it (0 + 0 + 0 = 0 ≠ 6), so this plane does not pass through the origin — it is shifted. The plane crosses the x-axis at (6, 0, 0), the y-axis at (0, 3, 0), and the z-axis at (0, 0, 2). Those three intercept points lie on the plane and determine it completely.
Two Planes Intersect in a Line
When we bring in the second equation 2x + 5y + 2z = 4, its plane intersects the first plane along a line L. Two planes in 3D generically meet in a line — not at a single point, but along a whole infinite line. After using just two equations, our solution set is still infinite. We have narrowed it down from all of 3D space to a single line, but that is still infinitely many points.
Three Planes Meet at One Point
The third equation 6x - 3y + z = 2 adds a third plane. If this plane is in general position relative to the line L — meaning it cuts across the line rather than containing it or being parallel to it — it will intersect the line L at exactly one point. That point (0, 0, 2) satisfies all three equations at once.
ROW: The row picture shows three planes meeting at a single point. That point is the solution. Two planes meet in a line; the third plane cuts that line at the answer. The geometry makes it clear why three independent equations in three unknowns usually give one unique solution.
3. The Column Picture: Combining Three Vectors
The column picture rewrites the same system as a vector equation. We ask: what combination of the three column vectors of A produces the right-hand side b?
x · [1] + y · [ 2] + z · [3] = [6]
[2] [ 5] [2] [4]
[6] [-3] [1] [2]
We need to find coefficients x, y, z that combine those three column vectors into b = (6, 4, 2). The answer (0, 0, 2) means: take zero copies of column 1, zero copies of column 2, and two copies of column 3. Verification: 2 · (3, 2, 1) = (6, 4, 2) = b. ✓
As Strang notes, the column form shows immediately why z = 2: the target b is simply twice the third column, and neither of the other two columns is needed. The column picture gives insight that the row picture sometimes hides.
COLUMN: The column picture combines three columns to produce b = (6, 4, 2). The solution (x, y, z) = (0, 0, 2) means we only need 2 times the third column — the other two contribute nothing for this particular b. Linear combinations are the key.
4. Building the 3×3 Matrix Equation
Just as with two equations, we pack the entire system into one matrix equation Ax = b. The coefficient matrix A is now 3×3, the unknown vector x has three entries, and the right-hand side b has three entries:
A = [ 1 2 3 ] x = [x] b = [6]
[ 2 5 2 ] [y] [4]
[ 6 -3 1 ] [z] [2]
Matrix equation: Ax = b
The coefficient matrix A holds all the coefficients from the left sides of the equations. Each row corresponds to one equation; each column corresponds to one unknown. The row view and the column view are both encoded inside this single compact object.
5. Solving by Elimination
The elimination procedure for a 3×3 system follows the same logic as for a 2×2 system, just with more steps. The goal is to systematically produce zeros below the diagonal, transforming A into an upper triangular matrix U.
Step 1 — use Equation 1 to eliminate x from Equation 2:
Eq2 = Eq2 - 2 × Eq1
Step 2 — use Equation 1 to eliminate x from Equation 3:
Eq3 = Eq3 - 6 × Eq1
Step 3 — use the new Equation 2 to eliminate y from Equation 3:
Eq3 = Eq3 - (multiplier) × new Eq2
Result: upper triangular system Ux = c
Once the system is triangular, back substitution works from bottom to top: the last equation gives z directly; substituting z into the second gives y; substituting both into the first gives x. Strang describes this process as one of the four fundamental steps to understanding elimination using matrices.
Elimination goes from A to a triangular U by a sequence of matrix steps Eᵢⱼ. The triangular system is solved by back substitution: working bottom to top. In matrix language, A is factored into LU — lower triangular times upper triangular. This is the algorithm that computers use.
6. When Three Equations Can Fail to Give a Unique Solution
Just as with two equations, there are situations where three equations in three unknowns either have no solution or have infinitely many. The geometry of the three planes tells the complete story.
Unique Solution — Three Planes at One Point
This is the generic, well-behaved case. The three planes are in general position — no two are parallel, and no three share a common line. They meet at exactly one point. The coefficient matrix A is invertible, and the unique solution is x = A⁻¹b.
No Solution — Parallel Planes or Inconsistent System
If two planes are parallel (same normal vector, different position), they never intersect — and adding a third plane cannot fix that. Similarly, two planes might meet in a line, but the third plane could be parallel to that line rather than cutting it. In either case, the system is inconsistent and b lies outside the column space of A.
Infinitely Many Solutions — Planes Share a Line
If all three planes contain a common line — meaning one equation is a combination of the other two, so the three planes are not truly independent — every point on that shared line satisfies all three equations. The matrix A is singular, its columns are dependent, and Cx = 0 has infinitely many solutions.
The column picture reveals the answer immediately. If b lies in the column space of A — meaning b is reachable as a linear combination of A's columns — then Ax = b has at least one solution. If A's columns are linearly independent (A is invertible), the solution is unique.
7. The Solution and Its Deeper Meaning
For our specific system, the solution (x, y, z) = (0, 0, 2) is the single point where all three planes intersect. The column picture confirms this with startling clarity: the target b = (6, 4, 2) is exactly twice the third column (3, 2, 1). The first two columns are not needed at all for this particular b.
Every solution to a linear system is, at its core, a statement about which linear combination of columns reaches b. The row picture shows where the planes meet; the column picture shows how the vectors combine. Both pictures describe the same truth, each in its own geometric language.
Strang emphasises this duality throughout his book because it builds two complementary types of intuition — spatial intuition about intersecting planes, and algebraic intuition about combining vectors. Learning to move fluently between these two perspectives is, in many ways, what it means to truly understand linear algebra at a deep level.
Master both pictures. The row picture gives you the geometry of intersecting planes. The column picture gives you the algebra of combining vectors. They are two views of the same mathematical reality, and switching between them effortlessly is the signature skill of a linear algebra thinker.
References & Further Reading
Gilbert Strang. Introduction to Linear Algebra, 5th ed. Wellesley-Cambridge Press, 2016. (Chapter 2.1: Three Equations in Three Unknowns)
3Blue1Brown. Essence of Linear Algebra, Chapter 7: Inverse Matrices, Column Space, Null Space. YouTube, 2016.
Khan Academy. Systems of equations with three variables. khanacademy.org/math/algebra
End of Blog 4 — Linear Algebra Series
More Linear-Algebra tutorials
- Introduction to Linear Algebra
- Linear Equations
- Understanding Vector Spaces
- Matrices
- Matrix Multiplication
- Vectors& Linear Equations
All tutorials · Try the free PySpark compiler · Practice challenges