If A and B are two matrices of the same dimension, A is said to be line-equivalent to B if B can be obtained from A by a finite sequence of elementary operations on the lines of A, such as the exchange of two lines, the multiplication of a line by a non-zero scalar, or the addition of a multiple of a line to another line.

### Example

The matrices A = \(\begin{pmatrix}1 & 2\\3 & 4\end{pmatrix}\) and B =\(\begin{pmatrix}1 & 2\\0 & -2\end{pmatrix}\) are row-equivalent, because matrix B was obtained by subtracting the first row from the second row 3 times.