# Rouché–Capelli theorem

In linear algebra, the Rouché–Capelli theorem determines the number of solutions for a system of linear equations, given the rank of its augmented matrix and coefficient matrix. The theorem is variously known as the:

## Formal statement

A system of linear equations with n variables has a solution if and only if the rank of its coefficient matrix A is equal to the rank of its augmented matrix [A|b].[1] If there are solutions, they form an affine subspace of ${\displaystyle \mathbb {R} ^{n}}$ of dimension n − rank(A). In particular:

• if n = rank(A), the solution is unique,
• otherwise there are infinitely many solutions.

## Example

Consider the system of equations

x + y + 2z = 3,
x + y + z = 1,
2x + 2y + 2z = 2.

The coefficient matrix is

${\displaystyle A={\begin{bmatrix}1&1&2\\1&1&1\\2&2&2\\\end{bmatrix}},}$

and the augmented matrix is

${\displaystyle (A|B)=\left[{\begin{array}{ccc|c}1&1&2&3\\1&1&1&1\\2&2&2&2\end{array}}\right].}$

Since both of these have the same rank, namely 2, there exists at least one solution; and since their rank is less than the number of unknowns, the latter being 3, there are infinitely many solutions.

In contrast, consider the system

x + y + 2z = 3,
x + y + z = 1,
2x + 2y + 2z = 5.

The coefficient matrix is

${\displaystyle A={\begin{bmatrix}1&1&2\\1&1&1\\2&2&2\\\end{bmatrix}},}$

and the augmented matrix is

${\displaystyle (A|B)=\left[{\begin{array}{ccc|c}1&1&2&3\\1&1&1&1\\2&2&2&5\end{array}}\right].}$

In this example the coefficient matrix has rank 2, while the augmented matrix has rank 3; so this system of equations has no solution. Indeed, an increase in the number of linearly independent columns has made the system of equations inconsistent.