# Do elementary row operations give a similar matrix transformation?

So we define two matrices $A,B$ to be similar if there exists an invertible square matrix $P$ such that $AP=PB$. I was wondering if $A,B$ are related via elementary row operations (say, they are connected via some permutation rows for example) then are the necessarily similar?

Obviously swapping rows multiplies the determinant by $-1$ but I was thinking if we permute rows in pairs, would this allow us to construct a similarity transformation?

Every invertible matrix is equivalent via row operations to the identity matrix, and the identity matrix is only similar to itself.

This also gives a counterexample to the permutation question; the identity matrix is not similar to a non-identity permutation matrix.

No. For instance, because row permutations do not preserve the trace. $$\begin{pmatrix} 1 & 2 \\ 4 & 3 \end{pmatrix}\to \begin{pmatrix} 4 & 3 \\ 1 & 2 \end{pmatrix}$$you can chenge the first matrix to the second via a permutation of the rows, but the trace of the first one is $4$ and the trace of the second one is $6$.

If $AP = PB$ then $\text{tr} B =\text{tr}( P^{-1} AP) =\text{tr}( PP^{-1}AP) =\text{tr} A$

Not sure if this adds anything to Matt Samuel's answer which was very good, but here is another take on the question. Saying that two matrices A and B differ by some elementary row operations is equivalent to saying that there exists an invertivle matrix E such that

$$A=EB$$

However, for A and B to be similar, there must exist some invertible nxn matrix P such that $$A = P^{-1}BP$$

Therefore, it is the case that $$AE^{-1} \sim B$$

In other words, if you are going to do some preliminary (invertible) operations to the matrix of a linear transformation, you need to undo them again after performing the transformation if you want to get back a similar transformation.

Answer is NO. Simplest exmple is as follows.

Consider two satrices $\begin{pmatrix} 1 & 0 \\ 0 & 1 \\ \end{pmatrix}$ and $\begin{pmatrix} 1 & 1 \\ 0 & 1 \\ \end{pmatrix}$. Both are row equivalent. But not similar.

• You are basically repeating Matt Samuel's answer, although you use a different row operation from his. – user1551 Jun 20 '17 at 7:36