Search for probability and statistics terms on Statlect
StatLect

Systems of linear equations and matrices

by , PhD

In this lecture we show how matrices and vectors can be used to represent and analyze systems of linear equations.

Table of Contents

Systems of linear equations

A system of K linear equations in $L$ unknowns is a set of equations[eq1]where [eq2] are the $L$ unknowns, and $A_{kl}$ (for $k=1,ldots ,K,$ and $l=1,ldots ,L$) and $b_{k}$ (for $k=1,ldots ,K$) are known constants.

Solutions

The unknowns are the values that we would like to find. Solving a system of linear equations means finding a set of values for [eq2] such that all the equations are satisfied. Such a set is called a solution of the system.

Example Define the system [eq4]It is a system of 2 equations in 2 unknowns. A solution of the system is[eq5]which can be verified by substituting these two values into the system:[eq6]

In general, a solution is not guaranteed to exist. If it exists, it is not guaranteed to be unique. Therefore, the theory of linear equations is concerned with three main aspects:

Matrix representation of a system

The above system of K linear equations in $L$ unknowns can be represented compactly by using matrices as follows:[eq7]where:

To understand how the representation works, notice that $Ax$ is a Kx1 vector whose k-th element is equal to the dot product of the k-th row of A and x, that is,[eq10]

Therefore,[eq11]

Example The system [eq12]can be represented as[eq13]where the $2	imes 2$ matrix of coefficients is[eq14]the $2	imes 1$ vector of unknowns is[eq15]and the $2	imes 1$ vector of constant terms is[eq16]

Existence of solutions

By writing a system of linear equations in matrix form, we can easily provide general conditions for the existence of a solution.

Proposition The linear system [eq13]has a solution if and only if $b$ belongs to the span of the columns of A.

Proof

The product $Ax$ can be interpreted as a linear combination of the columns of A, with coefficients taken from x. Therefore, the problem of solving the system is tantamount to finding a vector of coefficients x that allows us to write $b$ as a linear combination of the columns of A. But $b$ can be written as a linear combination of the columns of A if and only if it belongs to their span.

Uniqueness of the solution

We now give a general condition for the uniqueness of the solution.

Proposition If the linear system [eq13]has a solution, then the solution is unique if and only if the columns of A are linearly independent$.$

Proof

Let's first prove the if part. We have proved above that there is a solution if and only if $b$ belongs to the span of the columns of A. If the columns of A are linearly independent, then they form a basis for their span. Furthermore, the representation of any vector of the span as a linear combination of the basis is unique. Therefore, if the columns of $A,$ are linearly independent, there is only one linear combination of them that gives $b$ as a result, that is, the solution of the system is unique. Let's now prove the only if part. We are going to prove that if the columns are not independent, then there is more than one solution. Let $x_{0}$ be a solution, that is[eq19]When the columns of A are linearly dependent, there exists a non-zero vector $x_{1}$ that satisfies[eq20]As a consequence, there are infinite solutions because $x_{0}+lpha x_{1}$ is a solution of the system for any scalar $lpha $:[eq21]

Multiple solutions

The following proposition about multiple solution holds.

Proposition If the linear system [eq13]has a solution and the columns of A are not linearly independent, then there are infinite solutions.

Proof

See the previous proof.

Solved exercises

Below you can find some exercises with explained solutions.

Exercise 1

Find the matrix representation of the system [eq23]

Solution

The system can be represented as[eq13]where the $2	imes 3$ matrix of coefficients is[eq25]the $3	imes 1$ vector of unknowns is[eq26]and the $2	imes 1$ vector of constant terms is[eq27]

Exercise 2

Define[eq28]Write down the equations of the system[eq13]

Solution

The two equations of the systems are[eq30]

How to cite

Please cite as:

Taboga, Marco (2021). "Systems of linear equations and matrices", Lectures on matrix algebra. https://www.statlect.com/matrix-algebra/systems-of-linear-equations-and-matrices.

The books

Most of the learning materials found on this website are now available in a traditional textbook format.