Skip to content

Chapter 4. Linear Equations

A linear equation is an equation in which each unknown appears only to the first power and no products of unknowns occur. Linear equations are the first concrete objects of linear algebra. They lead naturally to systems of equations, matrices, row operations, solution sets, and the equation Ax=bAx=b. Standard linear algebra texts treat systems of linear equations as a starting point because they give both the computational and geometric form of the subject.

4.1 Linear Equations in One Variable

A linear equation in one variable has the form

ax=b, ax=b,

where aa and bb are scalars.

If a0a\ne 0, the equation has the unique solution

x=ba. x=\frac{b}{a}.

For example,

3x=12 3x=12

has solution

x=4. x=4.

If a=0a=0, then the equation becomes

0x=b. 0x=b.

If b=0b=0, every value of xx is a solution. If b0b\ne 0, there is no solution.

Thus even in one variable, a linear equation may have one solution, no solution, or infinitely many solutions.

4.2 Linear Equations in Several Variables

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

a1x1+a2x2++anxn=b, a_1x_1+a_2x_2+\cdots+a_nx_n=b,

where a1,a2,,ana_1,a_2,\ldots,a_n and bb are scalars.

The numbers a1,,ana_1,\ldots,a_n are called coefficients. The number bb is called the constant term or right-hand side.

For example,

2x13x2+5x3=7 2x_1-3x_2+5x_3=7

is a linear equation in three variables.

The equation

x1x2+x3=4 x_1x_2+x_3=4

is not linear because it contains a product of unknowns. The equation

x12+x2=1 x_1^2+x_2=1

is not linear because x1x_1 appears with power 22.

4.3 Solutions

A solution of a linear equation is a choice of values for the unknowns that makes the equation true.

For the equation

2x1+x2=5, 2x_1+x_2=5,

the vector

[21] \begin{bmatrix} 2\\ 1 \end{bmatrix}

is a solution because

2(2)+1=5. 2(2)+1=5.

The vector

[11] \begin{bmatrix} 1\\ 1 \end{bmatrix}

is not a solution because

2(1)+1=3. 2(1)+1=3.

A solution is therefore not an equation. It is a vector of values assigned to the unknowns.

4.4 Solution Sets

The solution set of an equation is the set of all its solutions.

For example, the equation

x+y=5 x+y=5

has infinitely many solutions:

(0,5),(1,4),(2,3),(5,0),(1,6). (0,5),\quad (1,4),\quad (2,3),\quad (5,0),\quad (-1,6).

All of these points lie on the same line in R2\mathbb{R}^2.

We may describe the whole solution set by choosing one variable freely. Let

y=t. y=t.

Then

x=5t. x=5-t.

Thus the solution set is

{[5tt]:tR}. \left\{ \begin{bmatrix} 5-t\\ t \end{bmatrix} :t\in\mathbb{R} \right\}.

The parameter tt records the freedom in the solution.

4.5 Geometry of a Linear Equation

In R2\mathbb{R}^2, one nonzero linear equation defines a line.

For example,

2x+y=5 2x+y=5

defines the line consisting of all points (x,y)(x,y) whose coordinates satisfy the equation.

In R3\mathbb{R}^3, one nonzero linear equation defines a plane. For example,

x+2y3z=4 x+2y-3z=4

defines a plane in three-dimensional space.

In Rn\mathbb{R}^n, one nonzero linear equation defines a hyperplane:

a1x1+a2x2++anxn=b. a_1x_1+a_2x_2+\cdots+a_nx_n=b.

The coefficient vector

a=[a1a2an] a= \begin{bmatrix} a_1\\ a_2\\ \vdots\\ a_n \end{bmatrix}

is normal to the hyperplane.

4.6 Homogeneous Linear Equations

A linear equation is homogeneous if its right-hand side is zero:

a1x1+a2x2++anxn=0. a_1x_1+a_2x_2+\cdots+a_nx_n=0.

Every homogeneous linear equation has at least one solution, namely the zero vector:

x1=x2==xn=0. x_1=x_2=\cdots=x_n=0.

This is called the trivial solution.

For example,

2xy=0 2x-y=0

has solution

[00]. \begin{bmatrix} 0\\ 0 \end{bmatrix}.

It also has nonzero solutions, such as

[12]. \begin{bmatrix} 1\\ 2 \end{bmatrix}.

The solution set of a homogeneous linear equation through the origin is a subspace. In R2\mathbb{R}^2, it is usually a line through the origin. In R3\mathbb{R}^3, it is usually a plane through the origin.

4.7 Nonhomogeneous Linear Equations

A linear equation is nonhomogeneous if its right-hand side is not zero:

a1x1+a2x2++anxn=b,b0. a_1x_1+a_2x_2+\cdots+a_nx_n=b, \qquad b\ne 0.

A nonhomogeneous equation does not pass through the origin unless the origin satisfies it. Since substituting the zero vector gives

0=b, 0=b,

the origin is not a solution when b0b\ne 0.

For example,

x+y=5 x+y=5

defines a line that does not pass through the origin.

A nonhomogeneous solution set is often a translate of a homogeneous solution set. If pp is one particular solution of

ax=b, a\cdot x=b,

then every solution can be written as

p+v, p+v,

where vv satisfies

av=0. a\cdot v=0.

4.8 Systems of Linear Equations

A system of linear equations is a finite collection of linear equations involving the same unknowns. A system can have no solution, exactly one solution, or infinitely many solutions.

For example,

x+y=5,2xy=1 \begin{aligned} x+y&=5,\\ 2x-y&=1 \end{aligned}

is a system of two equations in two unknowns.

A solution of the system must satisfy both equations at the same time. Solving the system means finding the intersection of the solution sets of the individual equations.

For this example, adding the two equations gives

3x=6, 3x=6,

so

x=2. x=2.

Substituting into x+y=5x+y=5 gives

y=3. y=3.

Thus the solution is

[23]. \begin{bmatrix} 2\\ 3 \end{bmatrix}.

4.9 Consistent and Inconsistent Systems

A system is consistent if it has at least one solution.

A system is inconsistent if it has no solution.

For example,

x+y=1,x+y=3 \begin{aligned} x+y&=1,\\ x+y&=3 \end{aligned}

is inconsistent. No pair (x,y)(x,y) can make both equations true.

Geometrically, these are two parallel lines in the plane. They never intersect.

The system

x+y=1,2x+2y=2 \begin{aligned} x+y&=1,\\ 2x+2y&=2 \end{aligned}

is consistent and has infinitely many solutions. The second equation is just twice the first equation, so both equations describe the same line.

4.10 Matrix Form

A system of linear equations can be written in matrix form.

The system

a11x1+a12x2++a1nxn=b1,a21x1+a22x2++a2nxn=b2,am1x1+am2x2++amnxn=bm \begin{aligned} a_{11}x_1+a_{12}x_2+\cdots+a_{1n}x_n&=b_1,\\ a_{21}x_1+a_{22}x_2+\cdots+a_{2n}x_n&=b_2,\\ &\vdots\\ a_{m1}x_1+a_{m2}x_2+\cdots+a_{mn}x_n&=b_m \end{aligned}

can be written as

Ax=b, Ax=b,

where

A=[a11a12a1na21a22a2nam1am2amn],x=[x1x2xn],b=[b1b2bm]. A= \begin{bmatrix} a_{11}&a_{12}&\cdots&a_{1n}\\ a_{21}&a_{22}&\cdots&a_{2n}\\ \vdots&\vdots&\ddots&\vdots\\ a_{m1}&a_{m2}&\cdots&a_{mn} \end{bmatrix}, \qquad x= \begin{bmatrix} x_1\\ x_2\\ \vdots\\ x_n \end{bmatrix}, \qquad b= \begin{bmatrix} b_1\\ b_2\\ \vdots\\ b_m \end{bmatrix}.

This notation separates three parts of the problem:

ObjectMeaning
AACoefficients
xxUnknowns
bbRight-hand side

The equation Ax=bAx=b is the basic symbolic form of linear systems.

4.11 Augmented Matrices

The augmented matrix of a system is formed by appending the right-hand side vector to the coefficient matrix.

For the system

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

the augmented matrix is

[125314]. \left[ \begin{array}{cc|c} 1&2&5\\ 3&-1&4 \end{array} \right].

The vertical bar separates coefficients from constants. It has no algebraic effect, but it helps display the system.

The augmented matrix records all numerical information in the system. Row operations on this matrix correspond to algebraic operations on the equations.

4.12 Equivalent Systems

Two systems of linear equations are equivalent if they have the same solution set.

For example, the systems

x+y=5,2xy=1 \begin{aligned} x+y&=5,\\ 2x-y&=1 \end{aligned}

and

x+y=5,3x=6 \begin{aligned} x+y&=5,\\ 3x&=6 \end{aligned}

are equivalent. The second system is obtained by adding the first two equations.

The equations look different, but the solution set is unchanged.

Solving a linear system usually means replacing it by simpler equivalent systems until the solution is clear.

4.13 Elementary Equation Operations

There are three elementary operations that preserve the solution set of a system:

OperationDescription
Interchange equationsSwap two equations
Scale an equationMultiply one equation by a nonzero scalar
Replace an equationAdd a multiple of one equation to another

These operations are the equation-level form of elementary row operations.

They preserve solutions because they do not change the logical content of the system. They only rewrite the same constraints in a more useful form.

4.14 Leading Variables and Free Variables

When a system is simplified, some variables are determined by equations. These are leading variables.

Other variables may be chosen freely. These are free variables.

For example, consider

x+2y=5. x+2y=5.

There is one equation and two unknowns. Let y=ty=t. Then

x=52t. x=5-2t.

Here xx is a leading variable and yy is a free variable. The solution set is

{[52tt]:tR}. \left\{ \begin{bmatrix} 5-2t\\ t \end{bmatrix} :t\in\mathbb{R} \right\}.

Free variables are the algebraic source of infinitely many solutions.

4.15 Parametric Form

A solution set with free variables is often written in parametric form.

For example,

x+2yz=3 x+2y-z=3

has three unknowns and one equation. Let

y=s,z=t. y=s, \qquad z=t.

Then

x=32s+t. x=3-2s+t.

Thus

[xyz]=[32s+tst]. \begin{bmatrix} x\\ y\\ z \end{bmatrix} = \begin{bmatrix} 3-2s+t\\ s\\ t \end{bmatrix}.

This can be written as

[xyz]=[300]+s[210]+t[101]. \begin{bmatrix} x\\ y\\ z \end{bmatrix} = \begin{bmatrix} 3\\ 0\\ 0 \end{bmatrix} + s \begin{bmatrix} -2\\ 1\\ 0 \end{bmatrix} + t \begin{bmatrix} 1\\ 0\\ 1 \end{bmatrix}.

The first vector is a particular solution. The remaining vectors describe directions along which one may move while staying in the solution set.

4.16 Number of Solutions

A linear system has only three possible solution behaviors:

TypeDescriptionGeometric meaning
No solutionInconsistent systemEmpty intersection
Exactly one solutionUnique solutionSingle intersection point
Infinitely many solutionsNonunique solutionLine, plane, or higher-dimensional set

A system cannot have exactly two solutions.

The reason is linearity. If a homogeneous system has two distinct solutions, then the difference between them gives a nonzero direction of freedom. That direction produces infinitely many solutions. The same idea applies to nonhomogeneous systems after subtracting one particular solution.

4.17 Linear Equations as Constraints

A linear equation imposes one linear constraint.

The equation

ax=b a\cdot x=b

restricts xx to lie on a hyperplane. A system imposes several constraints at once:

Ax=b. A x=b.

Each row of AA gives one equation. Each equation cuts down the possible values of xx, unless it is redundant or inconsistent with the others.

This constraint view is useful in optimization, statistics, geometry, and numerical computation.

4.18 Summary

A linear equation has the form

a1x1++anxn=b. a_1x_1+\cdots+a_nx_n=b.

A system of linear equations is a finite collection of such equations in the same unknowns. The solution set may be empty, contain one vector, or contain infinitely many vectors.

The main concepts are:

ConceptMeaning
CoefficientScalar multiplying an unknown
UnknownVariable to be solved for
SolutionValues satisfying the equation
Solution setAll solutions
Homogeneous equationRight-hand side is zero
Nonhomogeneous equationRight-hand side is nonzero
Consistent systemAt least one solution
Inconsistent systemNo solution
Augmented matrixCoefficients plus right-hand side
Free variableVariable chosen independently

Linear equations are the entry point to linear algebra because they connect symbolic calculation, geometry, and computation. The next chapters develop systematic methods for solving them.