= System of linear equations
{title2=$Ax=b$}
{wiki}
= Linear system
{synonym}
= Systems of linear equations
{synonym}
A <system of linear equations> imposes several <linear equations> on the same unknowns. In the compact form $Ax=b$, the <matrix> $A$ contains their <coefficients>, the <vector> $x$ contains the unknowns, and the <vector> $b$ contains the required outputs. Over the <real numbers>, the following examples exhibit the three possible outcomes: one solution, infinitely many solutions, or no solution.
For $x+y=3$ and $x-y=1$, adding the two <linear equations> gives $2x=4$, hence $x=2$ and $y=1$. Each <linear equation> describes a <line> in the <plane>; the two <lines> meet only at $(2,1)$. Substitution checks both requirements: $2+1=3$ and $2-1=1$. The two measurements together determine both unknowns.
Keeping only $x+y=3$ leaves a whole <line> of solutions:
$$
(x,y)=(3-t,t)=(3,0)+t(-1,1),\qquad t\in\mathbb R.
$$
For instance, $t=0,1,3$ gives $(3,0),(2,1),(0,3)$. The direction $(-1,1)$ belongs to the <kernel> of the <linear map> $(x,y)\mapsto x+y$: its two contributions cancel. Moving in that direction changes the unknowns without changing their measured sum. The solution <line> is an <affine space>, translated away from the origin.
For $x+y=3$ and $2x+2y=7$, the second <linear equation> instead demands $x+y=3.5$. The parallel <lines> never meet. In the <augmented matrix>, subtracting twice the first row from the second is an <elementary row operation> that exposes the contradiction:
$$
\left[\begin{array}{cc|c}1&1&3\\2&2&7\end{array}\right]
\longrightarrow
\left[\begin{array}{cc|c}1&1&3\\0&0&1\end{array}\right].
$$
The last row says $0=1$. A zero row of <coefficients> is harmless only when its appended entry is also zero.
\Image[/linear-system-solution-sets.png]
{title=Three <linear systems>: a unique intersection, a solution <line>, and incompatible parallel <lines>}
The column viewpoint unifies these pictures. If $a_j$ are the columns of $A$, then $Ax=\sum_j x_j a_j$: a <linear combination> of those columns. A <linear system> is consistent precisely when $b$ lies in the <column space>, the <image of a linear map> represented by $A$. Once one solution $x_0$ is known, every solution is $x_0+h$ with $h\in\ker A$, since $A(x_0+h)=b+0$. Conversely, subtracting any two solutions gives an element of the <kernel>. Thus the <kernel> measures freedom, while the <image of a linear map> decides existence. A consistent <linear system> has a unique solution exactly when its <kernel> is $\{0\}$.https://ocw.mit.edu/courses/18-06-linear-algebra-spring-2010/resources/lecture-1-the-geometry-of-linear-equations/[Strang, Lecture 1: The geometry of linear equations]{ref}
Counting <linear equations> alone does not tell us how much information is present. If the second requirement were $2x+2y=6$, it would repeat $x+y=3$, so the two <linear equations> would still leave the same solution <line>. The <matrix rank> counts independent requirements. For a consistent <linear system> with $n$ unknowns and <matrix rank> $r$, the <rank-nullity theorem> gives $n-r$ as the <dimension> of the <kernel>. This is the number of independent directions in which a solution can move. In the single-measurement example, one measured combination leaves one direction of freedom; in the sum-and-difference example, neither unknown can change without changing an output.
Back to article page