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?

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$
