In linear algebra, an augmented matrix ( A | B ) {\displaystyle (A\vert B)} is a k × ( n + 1 ) {\displaystyle k\times (n+1)} matrix obtained by appending a k {\displaystyle k} -dimensional column vector B {\displaystyle B} , on the right, as a further column to a k × n {\displaystyle k\times n} -dimensional matrix A {\displaystyle A} . This is usually done for the purpose of performing the same elementary row operations on the augmented matrix ( A | B ) {\displaystyle (A\vert B)} as is done on the original one A {\displaystyle A} when solving a system of linear equations by Gaussian elimination.
For example, given the matrices A {\displaystyle A} and column vector B {\displaystyle B} , where A = [ 1 3 2 2 0 1 5 2 2 ] , B = [ 4 3 1 ] , {\displaystyle A={\begin{bmatrix}1&3&2\\2&0&1\\5&2&2\end{bmatrix}},\quad B={\begin{bmatrix}4\\3\\1\end{bmatrix}},} the augmented matrix ( A | B ) {\displaystyle (A\vert B)} is ( A | B ) = [ 1 3 2 4 2 0 1 3 5 2 2 1 ] . {\displaystyle (A|B)=\left[{\begin{array}{ccc|c}1&3&2&4\\2&0&1&3\\5&2&2&1\end{array}}\right].}
For a given number n {\displaystyle n} of unknowns, the number of solutions to a system of k {\displaystyle k} linear equations depends only on the rank of the matrix of coefficients A {\displaystyle A} representing the system and the rank of the corresponding augmented matrix ( A | B ) {\displaystyle (A\vert B)} where the components of B {\displaystyle B} consist of the right hand sides of the k {\displaystyle k} successive linear equations. According to the Rouché–Capelli theorem, any system of linear equations
where X = ( x 1 , … , x n ) T {\displaystyle X=(x_{1},\dots ,x_{n})^{T}} is the n {\displaystyle n} -component column vector whose entries are the unknowns of the system is inconsistent (has no solutions) if the rank of the augmented matrix ( A | B ) {\displaystyle (A\vert B)} is greater than the rank of the coefficient matrix A {\displaystyle A} . If, on the other hand, the ranks of these two matrices are equal, the system must have at least one solution. The solution is unique if and only if the rank equals the number of variables n {\displaystyle n} . Otherwise the general solution has j {\displaystyle j} free parameters where j {\displaystyle j} is the difference between the number of variables n {\displaystyle n} and the rank. In such a case there as an affine space of solutions of dimension equal to this difference.
The inverse of a nonsingular square matrix A {\displaystyle A} of dimension n × n {\displaystyle n\times n} may be found by appending the n × n {\displaystyle n\times n} identity matrix I {\displaystyle \mathbf {I} } to the right of A {\displaystyle A} to form the n × 2 n {\displaystyle n\times 2n} dimensional augmented matrix ( A | I ) {\displaystyle (A\vert \mathbf {I} )} . Applying elementary row operations to transform the left-hand n × n {\displaystyle n\times n} block to the identity matrix I {\displaystyle \mathbf {I} } , the right-hand n × n {\displaystyle n\times n} block is then the inverse matrix A − 1 {\displaystyle A^{-1}}