Skip to content

Systems of Linear Equations

A system of linear equations is a collection of equations where every variable appears only to the first power — no squares, no products of variables, no transcendental functions. Because of this constraint, such systems have a rich algebraic structure that we can exploit computationally: matrix algebra lets us write any system of any size as a single compact equation, and then a family of efficient algorithms can solve it.


System Notation

A general system of mm equations in nn unknowns takes the form:

a11x1+a12x2+⋯+a1nxn=b1a_{11}x_{1}+a_{12}x_{2}+\cdots+a_{1n}x_{n}=b_{1}

a21x1+a22x2+⋯+a2nxn=b2a_{21}x_{1}+a_{22}x_{2}+\cdots+a_{2n}x_{n}=b_{2}

⋮\vdots

am1x1+am2x2+⋯+amnxn=bma_{m1}x_{1}+a_{m2}x_{2}+\cdots+a_{mn}x_{n}=b_{m}

Here aija_{ij} is the coefficient in equation ii that multiplies variable xjx_j, and bib_i is the right-hand side constant of equation ii.


Matrix Form

The entire system can be compressed into a single matrix equation. Collecting the coefficients into a matrix AA, the unknowns into a column vector xx, and the constants into a column vector bb:

[a11a12…a1na21a22…a2n⋮⋱⋮am1am2…amn]⏟A[x1x2⋮xn]⏟x=[b1b2⋮bm]⏟b\underbrace{\begin{bmatrix}a_{11}&a_{12}&\dots&a_{1n}\\a_{21}&a_{22}&\dots&a_{2n}\\\vdots&&\ddots&\vdots\\a_{m1}&a_{m2}&\dots&a_{mn}\end{bmatrix}}_{A}\underbrace{\begin{bmatrix}x_{1}\\x_{2}\\\vdots\\x_{n}\end{bmatrix}}_{x}=\underbrace{\begin{bmatrix}b_{1}\\b_{2}\\\vdots\\b_{m}\end{bmatrix}}_{b}

This is written compactly as:

A⋅x=bA \cdot x = b

where:

  • AA is an (n×n)(n \times n) matrix of coefficients
  • xx is an (n×1)(n \times 1) column vector of unknowns
  • bb is an (n×1)(n \times 1) column vector of right-hand side constants

Solution

If AA is invertible, multiplying both sides on the left by A−1A^{-1} gives the solution directly:

x=A−1⋅bx = A^{-1} \cdot b


Basic Properties of AA

For a unique solution to exist, two conditions must hold:

  1. AA must be a square matrix of shape (n×n)(n \times n) — the number of equations equals the number of unknowns.
  2. AA must be non-singular — its determinant must be non-zero, i.e. det⁡(A)≠0\det(A) \ne 0.

A singular matrix (det⁡(A)=0\det(A) = 0) means the rows are linearly dependent: at least one equation is redundant, and the system either has no solution or infinitely many.