Linear AlgebraLinear Systems

Linear Systems and Their Pictures

See a system as intersecting lines and planes, or as combining columns.

Not started Jump to practice

In Algebra 1 you solved two equations in two unknowns by eliminating one of them. Linear algebra starts from that same skill, then asks a bigger question: what does a system look like, and what kinds of answers can it have? There are two useful pictures, and you will use both for the rest of the course.

A linear equation in the unknowns $x_1, \dots, x_n$ has the form $a_1x_1 + a_2x_2 + \cdots + a_nx_n = b$, where the $a_i$ and $b$ are numbers. No products of unknowns, no powers, no square roots. A system is a list of such equations, and a solution is a list of numbers $(s_1, \dots, s_n)$ that makes every equation true at once. The set of all solutions is the solution set.

The row picture: lines and planes

Take the system $2x - y = 1$ and $x + y = 5$. Each equation, on its own, is a line in the $xy$-plane: all the points that satisfy it. A solution must lie on both lines, so it is where they cross. Drag the probe point and watch which equations it satisfies.

Row picture: each equation is a line; the solution is where they meet.

With three unknowns, each equation is a plane in space. Three planes can meet in a single point, share a whole line, or have no point in common (for example, two of them parallel).

The column picture: combining vectors

Now read the same system down the columns. The coefficients of $x$ form the vector $\begin{bmatrix} 2 \\ 1 \end{bmatrix}$ and those of $y$ form $\begin{bmatrix} -1 \\ 1 \end{bmatrix}$. The system says $$x\begin{bmatrix} 2 \\ 1 \end{bmatrix} + y\begin{bmatrix} -1 \\ 1 \end{bmatrix} = \begin{bmatrix} 1 \\ 5 \end{bmatrix}.$$ So the question becomes: how much of each column vector do we need to reach the right-hand side? This uses exactly the scaling and adding of vectors from precalculus.

Column picture: the solution gives the weights that combine the columns into the right-hand side.

Worked example: Both pictures for one system

Solve $2x - y = 1$, $x + y = 5$, and check the answer in both pictures.
  1. Add the two equations: the $y$ terms cancel, leaving $3x = 6$, so $x = 2$.
  2. Substitute into $x + y = 5$: $y = 3$.
  3. Row picture check: $(2, 3)$ is on both lines, since $2(2) - 3 = 1$ and $2 + 3 = 5$.
  4. Column picture check: $2\begin{bmatrix} 2 \\ 1 \end{bmatrix} + 3\begin{bmatrix} -1 \\ 1 \end{bmatrix}$ $= \begin{bmatrix} 4 \\ 2 \end{bmatrix} + \begin{bmatrix} -3 \\ 3 \end{bmatrix}$ $= \begin{bmatrix} 1 \\ 5 \end{bmatrix}$.

Answer: $(x, y) = (2, 3)$

Worked example: A system with no solution

How many solutions does $x + 2y = 3$, $2x + 4y = 7$ have?
  1. Double the first equation: $2x + 4y = 6$. The second equation has the same left side but says it equals $7$.
  2. No pair $(x, y)$ can make $2x + 4y$ equal both $6$ and $7$. The lines have the same slope and different intercepts: they are parallel.
  3. Column picture: the columns $\begin{bmatrix} 1 \\ 2 \end{bmatrix}$ and $\begin{bmatrix} 2 \\ 4 \end{bmatrix}$ point along the same line through the origin, and $\begin{bmatrix} 3 \\ 7 \end{bmatrix}$ is not on that line, so no combination reaches it.

Answer: No solution.

Why it works

Why can a linear system never have exactly two solutions? Suppose $\mathbf{p}$ and $\mathbf{q}$ are two different solutions. For any number $t$, look at $\mathbf{p} + t(\mathbf{q} - \mathbf{p})$. In each equation $a_1x_1 + \cdots + a_nx_n = b$, the left side is linear, so plugging in this point gives $b + t(b - b) = b$. Every one of these infinitely many points is a solution. So once there are two, there are infinitely many.
The three possibilities, seen both ways.
Row picture (2 unknowns)Column pictureNumber of solutions
Lines cross at one pointExactly one combination of the columns gives $\mathbf{b}$Exactly one
Lines are parallel$\mathbf{b}$ cannot be reachedNone
Lines are the same line$\mathbf{b}$ can be reached in many waysInfinitely many

Key idea

A linear system can be read by rows (lines or planes that must all pass through the solution) or by columns (which combination of the column vectors equals the right-hand side). Either way, it has no solution, exactly one, or infinitely many.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 1 XP.

Loading practice…

Builds on

Leads to

Sources and further reading

  • Margalit and Rabinoff, Interactive Linear Algebra (Georgia Tech), §1.1 Systems of Linear Equations
  • MIT OpenCourseWare 18.06 Linear Algebra (Gilbert Strang, Spring 2010), Lecture 1: The Geometry of Linear Equations
@teddyrookbook GitHub