Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

2.8: Systems of linear equations

We have described lines and planes using linear equations. What happens when we require a point to satisfy several equations at once? Geometrically, we are looking for the intersection of the corresponding lines or planes.

We’ll begin with two equations in two variables, then use lines and planes to explore larger systems. Finally, we’ll see why engineering problems can require thousands of equations and why we need a way to solve systems without drawing them.


Linear equations and their solutions

A linear equation in the variables x1,…,xnx_1,\ldots,x_n has the form

a1x1+⋯+anxn=b,a_1x_1+\cdots+a_nx_n=b,

where the coefficients a1,…,ana_1,\ldots,a_n and the right-hand side bb are fixed numbers. The variables appear only to the first power, and we do not multiply variables together. For example, 2x−3y=52x-3y=5 is linear, while x2+y=5x^2+y=5 and xy=5xy=5 are not.

The number of equations need not equal the number of variables. Three equations in xx and yy still describe points in R2\mathbb R^2; three equations in xx, yy, and zz describe points in R3\mathbb R^3.

For our geometric examples, each equation has at least one nonzero variable coefficient. Thus, an equation in two variables describes a line, and an equation in three variables describes a plane.


Two equations in two variables

Consider

{a1x+b1y=c1,a2x+b2y=c2.\begin{cases}a_1x+b_1y=c_1,\\a_2x+b_2y=c_2.\end{cases}

Each equation describes a line. A solution belongs to both lines, so the solution set is their intersection. There are three possibilities.

ArrangementCommon solution setNumber of solutions
Two lines intersect at one pointA pointOne
Two distinct parallel linesThe empty setNone
Two coincident linesThe entire lineInfinitely many

Coincident means that the two equations describe the same line, even if the equations look different.

Two lines that cross at a point have a transverse intersection. They need not be perpendicular. If we choose two lines at random, this is the typical situation: being parallel or coincident requires a special relationship between their directions.

Here, choosing equations at random means making independent, continuous choices of coefficients, without restrictions such as requiring every equation to be homogeneous.

Example: One solution

Consider the system:

{y=0,y=x.\begin{cases}y=0,\\y=x.\end{cases}

The first equation forces y=0y=0, and the second then forces x=0x=0. The only solution is (0,0)(0,0), where the lines intersect.

Example: No solutions

{y=1,y=−1.\begin{cases}y=1,\\y=-1.\end{cases}

No point can have both y=1y=1 and y=−1y=-1. These are distinct parallel lines, so their intersection is empty.

Example: Infinitely many solutions

{x−y=0,2x−2y=0.\begin{cases}x-y=0,\\2x-2y=0.\end{cases}

The second equation is twice the first, so it adds no new restriction. Both describe y=xy=x. The solution set is

{[tt]:t∈R}.\left\{\begin{bmatrix}t\\t\end{bmatrix}:t\in\mathbb R\right\}.
Image produced in Jupyter

Two lines can share one point, no points, or every point on a line. In the last panel, the dashed orange line lies on top of the blue line.


More equations and homogeneous systems

Adding an equation means keeping only the points that also satisfy that equation. It can shrink the solution set or leave it unchanged; it can never add new solutions.

For example, y=0y=0 and x=0x=0 meet at the origin. Adding x+y=2x+y=2 leaves no common solution. Each pair of lines intersects, but the three lines do not share a point. A solution of a system must satisfy all of its equations, not just some pair.

This is also the typical arrangement of three randomly chosen lines in R2\mathbb R^2: each pair intersects transversely, but the three intersection points form a triangle. The first two lines determine a point; the third line generally misses that point. Thus, the system typically has no solutions, even though every pair of equations has a solution.

Every homogeneous system has the zero solution, obtained by setting all variables to zero. Geometrically, all its lines or planes pass through the origin. A homogeneous system can therefore never have an empty solution set.

The converse needs care: a system can have solutions without being homogeneous. For instance, x=1x=1, y=2y=2 has the solution (1,2)(1,2), but it is not homogeneous in these coordinates.


Three equations in three variables

In R3\mathbb R^3, each equation ax+by+cz=dax+by+cz=d describes a plane when its normal vector is nonzero. A solution of a three-equation system is a point that lies on all three planes.

There are eight possible arrangements of three planes. How can we find them all without guessing? Start with two planes, then add the third.

First, consider two planes

Imagine two sheets of paper extending forever in every direction. There are three possibilities:

The planes coincide: they are the same plane.

Loading...

Two coincident planes share an entire plane. Drag to rotate. Colored patches represent portions of infinite planes.

The planes are parallel and distinct: they never meet.

Loading...

Two distinct parallel planes have no common points. Drag to rotate. Colored patches represent portions of infinite planes.

The planes intersect in a line.

Loading...

Two distinct nonparallel planes share the dark line L. Drag to rotate. Colored patches represent portions of infinite planes.

Two distinct planes cannot meet at just one point. If two sheets of paper cross, their intersection extends along a line.

Now call our three planes P1P_1, P2P_2, and P3P_3. We will use these three starting possibilities to organize the discussion. Changing the names of the planes does not give a new arrangement, so we will handle repeated planes first, then parallel pairs, then the remaining cases.

Two planes coincide: three possibilities

Suppose P1P_1 and P2P_2 are the same plane. Requiring a point to lie on both adds no restriction beyond requiring it to lie on that one plane. Adding P3P_3 is therefore just another two-plane problem:

Case 1: All three planes coincide. Every point on the shared plane satisfies all three equations. The solution set is a plane, so there are infinitely many solutions.

Loading...

Case 1: All three planes coincide; the common intersection is the whole plane. Drag to rotate. Colored patches represent portions of infinite planes.

Case 2: The third plane is parallel to the shared plane and distinct from it. There is no point on both, so the system has no solutions.

Loading...

Case 2: Two planes coincide and the third is parallel and distinct; there is no common point. Drag to rotate. Colored patches represent portions of infinite planes.

Case 3: The third plane intersects the shared plane. Their intersection is a line. Every point on that line lies on all three planes, so there are infinitely many solutions.

Loading...

Case 3: Two planes coincide and the third cuts them along the dark common line. Drag to rotate. Colored patches represent portions of infinite planes.

For example, start with P1:z=0P_1:z=0 and P2:2z=0P_2:2z=0. Choosing P3P_3 to be 3z=03z=0, z=1z=1, or x=0x=0 produces these three possibilities, respectively.

Two distinct planes are parallel: two new possibilities

Now suppose all three planes are distinct, and two of them are parallel. Name that pair P1P_1 and P2P_2. We have already handled any arrangement with repeated planes, so P3P_3 cannot coincide with either one.

Case 4: The third plane is parallel to both. We have three distinct parallel planes, like three separate sheets of paper stacked above one another.

Loading...

Case 4: Three distinct parallel planes have no common point. Drag to rotate. Colored patches represent portions of infinite planes.

Case 5: The third plane cuts both. It meets P1P_1 along one line and P2P_2 along another. These two lines are distinct and parallel within P3P_3.

Loading...

Case 5: The third plane cuts a parallel pair along two different dashed lines; no point lies on all three planes. Drag to rotate. Colored patches represent portions of infinite planes.

For example, start with P1:z=0P_1:z=0 and P2:z=1P_2:z=1. Choosing P3:z=2P_3:z=2 gives the first arrangement; choosing P3:x=0P_3:x=0 gives the second. A plane that cuts one of two parallel planes must cut the other, since the original planes have the same normal direction.

Both arrangements have no solutions. There is no point on both P1P_1 and P2P_2, so adding a third plane cannot create a point shared by all three. In particular, the two intersection lines in the second arrangement are pairwise intersections, not solutions of the whole system.

We have now found five arrangements. There are three left.

Two planes intersect in a line: three remaining possibilities

For the remaining arrangements, all three planes are distinct and no two are parallel. The first two planes meet along a line; call it LL.

Every solution must already lie on LL. Thus, instead of trying to picture three planes at once, ask: How can the line LL meet the third plane?

Case 6: The entire line lies on P3P_3. Think of three pages of a book meeting along its spine. All three planes share the same line, so there are infinitely many solutions. For example, x=0x=0, y=0y=0, and x+y=0x+y=0 all contain the zz-axis.

Loading...

Case 6: Three distinct planes meet along the same dark line, like pages meeting along a book spine. Drag to rotate. Colored patches represent portions of infinite planes.

Case 8: The line crosses P3P_3 at one point. That point is the only point on all three planes, so the system has exactly one solution. For example, the xyxy-plane and the yzyz-plane meet along the yy-axis. The xzxz-plane meets that axis only at the origin. Thus, the three coordinate planes share just the origin.

This is the typical arrangement of three randomly chosen planes in R3\mathbb R^3. The first two planes intersect in a line, and the third plane generally crosses that line at one point. This crossing is transverse, and the system has exactly one solution. Containing the entire line or being parallel to it requires a special alignment.

Loading...

Case 8: The coordinate planes meet at the dark point; the dashed lines are their pairwise intersections. Drag to rotate. Colored patches represent portions of infinite planes.

Case 7: The line is parallel to P3P_3 and does not lie on it. No point on LL belongs to P3P_3, so the system has no solutions. For example, x=0x=0 and y=0y=0 meet along the zz-axis, but no point on that axis satisfies x+y=1x+y=1. Each pair of planes still intersects in a line, yet there is no point shared by all three.

Loading...

Case 7: Every pair intersects along a different dashed line, but no point lies on all three planes. Drag to rotate. Colored patches represent portions of infinite planes.

These are the only ways a line and a plane can meet. We have therefore found all 3+2+3=83+2+3=8 arrangements, without counting any arrangement twice. The common solution set can be a plane, a line, a single point, or empty.

Summary of the eight configurations

In each row, the equations are listed in the order P1,P2,P3P_1,P_2,P_3.

CaseConfigurationEquationsCommon intersection
1All three coincidez=0z=0; 2z=02z=0; 3z=03z=0The plane z=0z=0; infinitely many solutions
2Two coincide; the third is parallel and distinctz=0z=0; 2z=02z=0; z=1z=1Empty
3Two coincide; the third intersects themz=0z=0; 2z=02z=0; x=0x=0The yy-axis; infinitely many solutions
4Three distinct parallel planesz=0z=0; z=1z=1; z=2z=2Empty
5Exactly two are parallel; the third cuts bothz=0z=0; z=1z=1; x=0x=0Empty
6Three distinct planes share a linex=0x=0; y=0y=0; x+y=0x+y=0The zz-axis; infinitely many solutions
7Every pair intersects, but all three have no common pointx=0x=0; y=0y=0; x+y=1x+y=1Empty
8Three planes meet at exactly one pointx=0x=0; y=0y=0; z=0z=0The origin; one solution

For the pairwise intersections: coincident planes intersect in the entire plane, and distinct parallel planes have empty intersection. In case 3, the third plane meets each of the coincident planes in the same line. In case 5, the third plane meets the parallel pair in two distinct parallel lines. In case 6, all three pairwise intersections are the same line. In case 7, they are the three parallel lines

[00t],[01t],[10t],t∈R.\begin{bmatrix}0\\0\\t\end{bmatrix},\qquad \begin{bmatrix}0\\1\\t\end{bmatrix},\qquad \begin{bmatrix}1\\0\\t\end{bmatrix},\qquad t\in\mathbb R.

In case 8, they are the three coordinate axes, which meet at the origin.

Cases 1, 3, 6, and 8 can represent homogeneous systems. They have a common point where we can place the origin; the numerical examples above are already homogeneous. The remaining configurations have no common point.

Completeness: if two planes coincide, we obtain cases 1–3. If all three are distinct and there is a parallel pair, we obtain cases 4–5. Otherwise, P1P_1 and P2P_2 meet along a line LL. The third plane contains LL (case 6), crosses it at one point (case 8), or misses it (case 7). These branches give 3+2+3=83+2+3=8 arrangements.

Case 7 shows that pairwise intersection does not guarantee a common solution.

Worked examples

The following examples use the same idea with less immediate equations: find the line shared by two planes, then determine which points on that line lie on the third plane.

Example: Three planes sharing a line

Consider

{2x−y+3z=−3,x+2y−z=6,3x−4y+7z=−12.\begin{cases} 2x-y+3z=-3,\\ x+2y-z=6,\\ 3x-4y+7z=-12. \end{cases}

The first two planes have normals [2−13]\begin{bmatrix}2\\-1\\3\end{bmatrix} and [12−1]\begin{bmatrix}1\\2\\-1\end{bmatrix}, which are not multiples. They meet in a line. The point (1,2,−1)(1,2,-1) lies on both planes, and [−111]\begin{bmatrix}-1\\1\\1\end{bmatrix} is perpendicular to both normals. Thus, their intersection is

[xyz]=[12−1]+t[−111],t∈R.\begin{bmatrix}x\\y\\z\end{bmatrix} =\begin{bmatrix}1\\2\\-1\end{bmatrix} +t\begin{bmatrix}-1\\1\\1\end{bmatrix},\qquad t\in\mathbb R.

The third equation is twice the first minus the second, including the right-hand side:

2(−3)−6=−12.2(-3)-6=-12.

Every point on that line therefore satisfies the third equation too. The solution set is the entire line, so there are infinitely many solutions.

Example: Every pair intersects, but there is no common solution

Change just the last right-hand side:

{2x−y+3z=−3,x+2y−z=6,3x−4y+7z=−11.\begin{cases} 2x-y+3z=-3,\\ x+2y-z=6,\\ 3x-4y+7z=-11. \end{cases}

Any solution of the first two equations must satisfy 3x−4y+7z=−123x-4y+7z=-12, so it cannot also satisfy the third. There are no solutions, even though every pair of planes intersects. Their pairwise intersection lines are distinct and parallel.

Example: Exactly one solution

Instead, replace the third equation by 3x+y−2z=73x+y-2z=7:

{2x−y+3z=−3,x+2y−z=6,3x+y−2z=7.\begin{cases} 2x-y+3z=-3,\\ x+2y-z=6,\\ 3x+y-2z=7. \end{cases}

Every solution must lie on the line from the first example, so substitute x=1−tx=1-t, y=2+ty=2+t, and z=−1+tz=-1+t into the third equation:

3(1−t)+(2+t)−2(−1+t)=7,3(1-t)+(2+t)-2(-1+t)=7,

or 7−4t=77-4t=7. This forces t=0t=0, giving the unique solution (1,2,−1)(1,2,-1).

Loading...

Choose one of the three examples, then drag to rotate the planes. The dark line is the intersection of the first two planes; a dark point marks the unique solution in the last example. The colored patches show only part of each infinite plane.


Why engineering problems have so many unknowns

The same idea of satisfying several constraints at once appears in heat flow, circuits, and structures. The main difference is the number of variables.

Temperatures inside a chip

Suppose we model a chip using nine interior grid points. The temperatures along the boundary are known, while the interior temperatures T1,…,T9T_1,\ldots,T_9 are unknown. The table shows their positions; the boundary values are illustrative temperatures in degrees Celsius after temperatures have settled.

404550
35T1T_1T2T_2T3T_355
40T4T_4T5T_5T6T_660
45T7T_7T8T_8T9T_965
455055

In this simplified model, heat leaving each interior region balances the heat generated there. The resulting equation says that four times its temperature equals the sum of its four neighboring temperatures plus a source term of 8.

The neighbors of T1T_1 have temperatures 40, 35, T2T_2, and T4T_4, so

4T1=40+35+T2+T4+8,4T_1=40+35+T_2+T_4+8,

or

4T1−T2−T4=83.4T_1-T_2-T_4=83.

The 8 is the heat-generation contribution after the model’s constants have been combined; it is not a fifth neighboring temperature. Applying the same balance at every interior grid point gives

4T1−T2−T4=83,4T2−T1−T3−T5=53,4T3−T2−T6=113,4T4−T1−T5−T7=48,4T5−T2−T4−T6−T8=8,4T6−T3−T5−T9=68,4T7−T4−T8=98,4T8−T5−T7−T9=58,4T9−T6−T8=128.\begin{aligned} 4T_1-T_2-T_4&=83,\\ 4T_2-T_1-T_3-T_5&=53,\\ 4T_3-T_2-T_6&=113,\\ 4T_4-T_1-T_5-T_7&=48,\\ 4T_5-T_2-T_4-T_6-T_8&=8,\\ 4T_6-T_3-T_5-T_9&=68,\\ 4T_7-T_4-T_8&=98,\\ 4T_8-T_5-T_7-T_9&=58,\\ 4T_9-T_6-T_8&=128. \end{aligned}

There are nine equations in nine unknowns. We need temperatures that satisfy all nine equations simultaneously; changing one temperature affects several balances.

A finer grid estimates temperatures at more locations:

Interior gridUnknown temperaturesLinear equations
3×33\times399
10×1010\times10100100
100×100100\times10010,00010,000

Voltages in a resistor network

Now consider a circuit with six unknown junction voltages x1,…,x6x_1,\ldots,x_6. A supply holds the left rail at 12 volts and the right rail at 0 volts. At every junction, current entering equals current leaving.

At junction x1x_1, a 2 Ω2\,\Omega resistor connects to the 12-volt rail, a 3 Ω3\,\Omega resistor connects to x2x_2, and a 6 Ω6\,\Omega resistor connects to x4x_4. Ohm’s law gives current as voltage difference divided by resistance, so

12−x12=x1−x23+x1−x46.\frac{12-x_1}{2}=\frac{x_1-x_2}{3}+\frac{x_1-x_4}{6}.

Multiplying by 6 and collecting terms gives

6x1−2x2−x4=36.6x_1-2x_2-x_4=36.

Writing the corresponding balance at each junction in the network gives

6x1−2x2−x4=36,−4x1+13x2−3x3−6x5=0,−x2+4x3−x6=0,−2x1+11x4−6x5=36,−3x2−3x4+8x5−2x6=0,−3x3−4x5+9x6=0.\begin{aligned} 6x_1-2x_2-x_4&=36,\\ -4x_1+13x_2-3x_3-6x_5&=0,\\ -x_2+4x_3-x_6&=0,\\ -2x_1+11x_4-6x_5&=36,\\ -3x_2-3x_4+8x_5-2x_6&=0,\\ -3x_3-4x_5+9x_6&=0. \end{aligned}

Each unknown voltage appears in several equations because neighboring junctions are connected. A network with 5,000 unknown junction voltages similarly gives 5,000 current-balance equations.

Bridges and aircraft wings

For a structural model, the unknowns can be displacements. A model with 10,000 freely moving points in three-dimensional space has 30,000 unknown displacement components: one in each coordinate direction at each point. For small deformations, a linear model relates these displacements to the applied forces.


Next: Organizing systems using matrices

Geometry tells us what a solution means: it must satisfy every equation at once. It also helps us understand why a system may have no solutions, one solution, or infinitely many.

But we cannot solve a system with thousands of variables by drawing its solution set. We need algebraic methods that organize the coefficients and operate on the equations systematically.

Next time, we’ll introduce matrices, which give us a compact way to organize linear systems and a starting point for methods that work far beyond two or three variables.