Skip to content

Two pictures of a linear system

See two equations as two crossing lines and as two arrows mixed to reach a target, and tell one answer, none or infinitely many apart.

Helps to know firstA matrix moves the plane

Helps to know first
This topic

First, the picture

Two equations, two unknowns. Watch one answer appear twice: where two lines cross, and as a mix of two arrows.

One answer, two pictures

The rows are two lines; the columns are two arrows and the target b.

Two equations, 2x − y = 4 and x + y = 5. Each row is a line; the columns are two arrows.

from the rows
–
from the columns
–
0.00 / 9.20 s
Describe this picture

Two panels side by side (one above the other on a phone), each with its own grid. The first, “rows”, draws the line 2x−y=42x-y=4 and then the line x+y=5x+y=5; they cross at the point (3,2)(3,2), which is marked. The second, “columns”, draws the arrows a1=(2,1)\mathbf{a}_1=(2,1) and a2=(−1,1)\mathbf{a}_2=(-1,1) from the origin and the target b=(4,5)\mathbf{b}=(4,5). Then three copies of (2,1)(2,1) and two copies of (−1,1)(-1,1) are laid tip to tail and end on b\mathbf{b}. The pieces build one after another. Two readouts give the pair each picture finds, the same (3,2)(3,2). When the clip has finished, the tip of b\mathbf{b} can be dragged in the columns panel, or moved with the arrow keys, in steps of half a unit. The two lines slide, each staying parallel to itself, their crossing moves, and the two readouts change together; when the pair is not whole numbers, the chain is one stretched copy of each arrow.

Rows: each equation is a line

Here is a small puzzle. Find two numbers xx and yy with

2x−y=4,x+y=5.\begin{aligned} 2x-y&=4,\\ x+y&=5. \end{aligned}

Take the first equation alone. Many pairs satisfy it: (2,0)(2,0), (3,2)(3,2), (0,−4)(0,-4) and every point on the straight line through them. So one equation in two unknowns is a line in the plane. The second equation is another line, through (5,0)(5,0) and (0,5)(0,5).

A pair that satisfies both equations lies on both lines. That is the crossing point, (3,2)(3,2), in the left panel at the top of the page. You can find it without the picture: add the two equations, and yy cancels, leaving 3x=93x=9. So x=3x=3, and then y=5−3=2y=5-3=2.

Each line has a direction it cannot slide off. Read the first equation as a dot product, from Length and the dot product: (2,−1)⋅(x,y)=4(2,-1)\cdot(x,y)=4. The line is every point whose dot product with (2,−1)(2,-1) is 4, and the arrow (2,−1)(2,-1) stands at a right angle to it. Changing the 4 slides the line along that arrow, so the line stays parallel to itself. That is what you see when you drag b\mathbf{b} after the clip.

Columns: the same question as arrows

Now read the same two equations down the columns instead of across the rows. The numbers next to xx are 22 and 11; the numbers next to yy are −1-1 and 11. So the two equations together say

x[21]+y[−11]=[45].x\begin{bmatrix}2\\1\end{bmatrix}+y\begin{bmatrix}-1\\1\end{bmatrix}=\begin{bmatrix}4\\5\end{bmatrix}.

This is a different question with the same answer: how much of the arrow (2,1)(2,1) and how much of the arrow (−1,1)(-1,1) add up to (4,5)(4,5)? The right panel answers it. Three of the first and two of the second, tip to tail, end exactly on (4,5)(4,5).

You have met this before. In A matrix moves the plane, the matrix with columns (2,1)(2,1) and (−1,1)(-1,1) sent the point (3,2)(3,2) to (4,5)(4,5). Solving the equations runs that map backwards: we know where the point landed, and we ask where it started.

Drag b\mathbf{b} after the clip. The arrows stretch or shrink to reach it, the lines on the left slide, and the two readouts always show the same pair.

The matrix form

Both pictures come from one table of numbers. Write the unknowns as x1=xx_1=x and x2=yx_2=y, and the right-hand sides as b1=4b_1=4 and b2=5b_2=5. The entry in row pp and column qq is apqa_{pq}, and both indices count from 1. Then the system is

a11x1+a12x2=b1,a21x1+a22x2=b2,orAx=b,A=[2−111], b=[45].\begin{aligned} a_{11}x_1+a_{12}x_2&=b_1,\\ a_{21}x_1+a_{22}x_2&=b_2, \end{aligned} \qquad\text{or}\qquad \mathbf{A}\mathbf{x}=\mathbf{b},\quad \mathbf{A}=\begin{bmatrix}2&-1\\1&1\end{bmatrix},\ \mathbf{b}=\begin{bmatrix}4\\5\end{bmatrix}.

The two pictures are the two ways to read Ax\mathbf{A}\mathbf{x}. Row by row, each row of A\mathbf{A} dotted with x\mathbf{x} must give one number of b\mathbf{b}: that is a line. Column by column, Ax=x1a1+x2a2\mathbf{A}\mathbf{x}=x_1\mathbf{a}_1+x_2\mathbf{a}_2 must equal b\mathbf{b}: that is a mix of arrows.

One answer, none, or infinitely many

Two lines do not always cross at one point. Try x+y=2x+y=2 and 2x+2y=b22x+2y=b_2, with b2b_2 still to choose. The columns are now (1,2)(1,2) and (1,2)(1,2), the same arrow twice.

When it fails

x + y = 2 and 2x + 2y = b_2: the same arrow twice.

x + y = 2 and 2x + 2y = 3: both columns are the arrow (1, 2), on one dashed line.

from the rows
–
from the columns
–
0.00 / 9.20 s
Describe this picture

The same two panels, for the equations x+y=2x+y=2 and 2x+2y=b22x+2y=b_2. In the columns panel, both columns are the arrow (1,2)(1,2), drawn along one dashed line through the origin, and the target b=(2,b2)\mathbf{b}=(2,b_2) starts at (2,3)(2,3). In the rows panel, the two lines are drawn. When the clip has finished, the tip of b\mathbf{b} can be dragged up and down, or moved with the arrow keys in steps of half a unit, which changes b2b_2; its first number stays 2. While b\mathbf{b} is off the dashed line, the two lines in the rows panel are parallel and never meet, and both readouts say there is no solution. When b\mathbf{b} reaches (2,4)(2,4) on the dashed line, the two lines become one line, the second drawn dashed over the first, and the readouts say there are infinitely many solutions.

Drag b\mathbf{b} and watch both panels. Off the dashed line no mix of the columns reaches b\mathbf{b}, because every mix of (1,2)(1,2) and (1,2)(1,2) lies on that line. On the left the same fact looks different: the lines are parallel, with no crossing. At b2=4b_2=4 the second equation is the first one doubled, so both lines are the same line, and every point on it is a solution.

So a system can have one solution, none, or infinitely many. It can never have exactly two. Suppose x\mathbf{x} and x′\mathbf{x}' both solve Ax=b\mathbf{A}\mathbf{x}=\mathbf{b}. Then every point x+c (x′−x)\mathbf{x}+c\,(\mathbf{x}'-\mathbf{x}) on the line through them solves it too, because

A(x+c (x′−x))=b+c (b−b)=b.\mathbf{A}\big(\mathbf{x}+c\,(\mathbf{x}'-\mathbf{x})\big)=\mathbf{b}+c\,(\mathbf{b}-\mathbf{b})=\mathbf{b}.

Two solutions bring a whole line of them.

Having as many equations as unknowns does not settle it either. Both examples above have two of each; one has a single answer and the other has none or infinitely many. What decides is whether the columns point in different directions.

With three unknowns, each equation is a flat plane in space, and three planes usually meet in one point. They can also meet along a whole line, or have no point in common at all.

Three planes

Three equations in three unknowns: one answer, a line of answers, or none.

Three equations in three unknowns: each one is a flat plane in space.

0.00 / 6.90 s
Describe this picture

Three small 3-D views side by side (stacked on a phone), named “one point”, “one line” and “no common point”, each with three planes in three colours that appear one after another. In the first, the three planes cross at the origin, which is then marked with a dot. In the second, three upright planes share one vertical line, like the pages of an open book, and that line is drawn. In the third, three upright planes form a triangular tube: each pair meets in a vertical line, the three lines are drawn dashed, and they are parallel, so no point lies on all three planes. The views turn a little and rest. There is no control.

Worked example

  1. One answer. 2x−y=42x-y=4 and x+y=5x+y=5. Add them: 3x=93x=9, so x=3x=3 and y=2y=2. Column check: 3 (2,1)+2 (−1,1)=(4,5)3\,(2,1)+2\,(-1,1)=(4,5).
  2. Matrix form. The same system is Ax=b\mathbf{A}\mathbf{x}=\mathbf{b} with A=[2−111]\mathbf{A}=\begin{bmatrix}2&-1\\1&1\end{bmatrix} and b=(4,5)\mathbf{b}=(4,5).
  3. No answer. x+y=1x+y=1 and x+y=3x+y=3. Predict before reading on: where do these lines meet? Nowhere, they are parallel. In columns, x (1,1)+y (1,1)x\,(1,1)+y\,(1,1) always has two equal numbers, so it can never be (1,3)(1,3).
  4. Infinitely many. x+y=2x+y=2 and 2x+2y=42x+2y=4 are the same line. The points (2,0)(2,0), (1,1)(1,1) and (0,2)(0,2) all solve both, and so does every other point on that line.
  5. A mixing problem. How many litres of a 10 % solution and of a 30 % solution make 10 litres at 22 %? Call them xx and yy. The volumes give x+y=10x+y=10, and the dissolved amounts give 0.1x+0.3y=2.20.1x+0.3y=2.2. Take 0.1 times the first equation from the second: 0.2y=1.20.2y=1.2, so y=6y=6 and x=4x=4. Check: 0.4+1.8=2.20.4+1.8=2.2.

Where you’ll meet this

Mixing problems like the last one are linear systems: one equation per thing you measure, one unknown per ingredient. So are the equations of an electric circuit, where the currents flowing into each junction must add up to zero.

Balancing a chemical equation is one too. To burn propane, find whole numbers in a C3H8+b O2→c CO2+d H2Oa\,\mathrm{C_3H_8}+b\,\mathrm{O_2}\to c\,\mathrm{CO_2}+d\,\mathrm{H_2O}. Each element gives one equation: carbon 3a=c3a=c, hydrogen 8a=2d8a=2d, oxygen 2b=2c+d2b=2c+d. With a=1a=1, these give c=3c=3, d=4d=4 and b=5b=5: C3H8+5 O2→3 CO2+4 H2O\mathrm{C_3H_8}+5\,\mathrm{O_2}\to3\,\mathrm{CO_2}+4\,\mathrm{H_2O}.

In signal processing · linear equations

In Anti-aliasing and practical converters, far above its cut-off, a filter’s gain in decibels falls along a straight line when it is drawn against the logarithm of frequency. Asking for a given drop at a given frequency is then one linear equation in one unknown, the filter’s order.

Reference card

QuantityFormulaNotes
A systemap1x1+ap2x2=bpa_{p1}x_1+a_{p2}x_2=b_pone equation per row pp
Matrix formAx=b\mathbf{A}\mathbf{x}=\mathbf{b}indices count from 1
Row picturerow pp of A\mathbf{A} dotted with x\mathbf{x} is bpb_peach equation is a line; a plane with three unknowns
Column picturex1a1+x2a2=bx_1\mathbf{a}_1+x_2\mathbf{a}_2=\mathbf{b}b\mathbf{b} as a mix of the columns
Outcomesone, none, or infinitely manynever exactly two
No solutionb\mathbf{b} is not a mix of the columnsthe lines are parallel

Keep reading with a free account.

By creating an account you accept the terms of use.

Sign in

Already have an account? Use the service you signed up with.

Or keep reading: get new lessons by email

Are you 13 or over?

Accounts and email updates are for people aged 13 or over. We keep only your answer, never your date of birth.

End of the lesson

Where to go next.

Phasorium

Account

Sign inKeep your place on any device

Subjects

Site

Look