Matrix equivalence

In linear algebra, two rectangular "m"-by-"n" matrices "A" and "B" are called equivalent if
for some invertible "n"-by-"n" matrix "P" and some invertible "m"-by-"m" matrix "Q". Equivalent matrices represent the same linear transformation "V" → "W" under two different choices of a pair of bases of "V" and "W", with "P" and "Q" being the change of basis matrices in "V" and "W" respectively.
The notion of equivalence should not be confused with that of similarity, which is only defined for square matrices, and is much more restrictive (similar matrices are certainly equivalent, but equivalent square matrices need not be similar). That notion corresponds to matrices representing the same endomorphism "V" → "V" under two different choices of a "single" basis of "V", used both for initial vectors and their images.
Properties.
Matrix equivalence is an equivalence relation on the space of rectangular matrices.
For two rectangular matrices of the same size, their equivalence can also be characterized by the following conditions
Canonical form.
The rank property yields an intuitive canonical form for matrices of the equivalence class of rank formula_2 as
formula_3, 
where the number of formula_4s on the diagonal is equal to formula_2. This is a special case of the Smith normal form, which generalizes this concept on vector spaces to free modules over principal ideal domains.