# Row equivalence

In linear algebra, two matrices are row equivalent if one can be changed to the other by a sequence of elementary row operations. Alternatively, two m × n matrices are row equivalent if and only if they have the same row space. The concept is most commonly applied to matrices that represent systems of linear equations, in which case two matrices of the same size are row equivalent if and only if the corresponding homogeneous systems have the same set of solutions, or equivalently the matrices have the same null space.
Because elementary row operations are reversible, row equivalence is an equivalence relation. It is commonly denoted by a tilde (~).
There is a similar notion of column equivalence, defined by elementary column operations; two matrices are column equivalent if and only if their transpose matrices are row equivalent. Two rectangular matrices that can be converted into one another allowing both elementary row and column operations are called simply equivalent.

## Elementary row operations

An elementary row operation is any one of the following moves:
* Swap: Swap two rows of a matrix.
* Scale: Multiply a row of a matrix by a nonzero constant.
* Pivot: Add a multiple of one row of a matrix to another row.
Two matrices A and B are row equivalent if it is possible to transform A into B by a sequence of elementary row operations.

## Row space

The row space of a matrix is the set of all possible linear combinations of its row vectors. If the rows of the matrix represent a system of linear equations, then the row space consists of all linear equations that can be deduced algebraically from those in the system. Two m × n matrices are row equivalent if and only if they have the same row space.
For example, the matrices
    ${\begin{pmatrix}1&0&0\\0&1&1\end{pmatrix}}\;\;\;\;{\text{and}}\;\;\;\;{\begin{pmatrix}1&0&0\\1&1&1\end{pmatrix}}$
are row equivalent, the row space being all vectors of the form ${\begin{pmatrix}a&b&b\end{pmatrix}}$. The corresponding systems of homogeneous equations convey the same information:
    ${\begin{matrix}x=0\\y+z=0\end{matrix}}\;\;\;\;{\text{and}}\;\;\;\;{\begin{matrix}x=0\\x+y+z=0.\end{matrix}}$
In particular, both of these systems imply every equation of the form $ax+by+bz=0.\,$

## Equivalence of the definitions

The fact that two matrices are row equivalent if and only if they have the same row space is an important theorem in linear algebra. The proof is based on the following observations:
* Elementary row operations do not affect the row space of a matrix. In particular, any two row equivalent matrices have the same row space.
* Any matrix can be reduced by elementary row operations to a matrix in reduced row echelon form.
* Two matrices in reduced row echelon form have the same row space if and only if they are equal.
This line of reasoning also proves that every matrix is row equivalent to a unique matrix with reduced row echelon form.

## Additional properties

* Because the null space of a matrix is the orthogonal complement of the row space, two matrices are row equivalent if and only if they have the same null space.
* The rank of a matrix is equal to the dimension of the row space, so row equivalent matrices must have the same rank. This is equal to the number of pivots in the reduced row echelon form.
* A matrix is invertible if and only if it is row equivalent to the identity matrix.
* Matrices A and B are row equivalent if and only if there exists an invertible matrix P such that A=PB.