Augmented matrix

In linear algebra, an augmented matrix is a matrix obtained by appending the columns of two given matrices, usually for the purpose of performing the same elementary row operations on each of the given matrices.
Given the matrices "A" and "B", where
formula_1
the augmented matrix ("A"|"B") is written as
formula_2
This is useful when solving systems of linear equations. 
For a given number of unknowns, the number of solutions to a system of linear equations depends only on the rank of the matrix representing the system and the rank of the corresponding augmented matrix. Specifically, according to the Rouché–Capelli theorem, any system of linear equations is inconsistent (has no solutions) if the rank of the augmented matrix is greater than the rank of the coefficient matrix; 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. Otherwise the general solution has "k" free parameters where "k" is the difference between the number of variables and the rank; hence in such a case there are an infinitude of solutions.
An augmented matrix may also be used to find the inverse of a matrix by combining it with the identity matrix.
To find the inverse of a matrix.
Let "C" be the square 2×2 matrix 
To find the inverse of C we create ("C"|"I") where I is the 2×2 identity matrix. We then reduce the part of ("C"|"I") corresponding to "C" to the identity matrix using only elementary row operations on ("C"|"I"). 
the right part of which is the inverse of the original matrix.
Existence and number of solutions.
Consider the system of equations
The coefficient matrix is 
and the augmented matrix is
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 an infinite number of solutions.
In contrast, consider the system
formula_9
The coefficient matrix is 
and the augmented matrix is
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 rows has made the system of equations inconsistent.
Solution of a linear system.
As used in linear algebra, an augmented matrix is used to represent the coefficients and the solution vector of each equation set.
For the set of equations
the coefficients and constant terms give the matrices
and hence give the augmented matrix
Note that the rank of the coefficient matrix, which is 3, equals the rank of the augmented matrix, so at least one solution exists; and since this rank equals the number of unknowns, there is exactly one solution.
To obtain the solution, row operations can be performed on the augmented matrix to obtain the identity matrix on the left side, yielding
so the solution of the system is ("x", "y", "z") = (4, 1, -2).