**Matrix equivalence** is a relation between matrices of the same size that captures when two matrices represent the same linear transformation under different choices of bases.

**Definition:** Two $m \times n$ matrices $A$ and $B$ are **equivalent** if there exist invertible matrices $P$ (of size $m \times m$) and $Q$ (of size $n \times n$) such that:

$$B = PAQ$$

Matrix equivalence is an **equivalence relation** (reflexive, symmetric, transitive) and partitions the set of $m \times n$ matrices into equivalence classes.

**Key facts:**
- Two matrices are equivalent iff they have the same rank
- Every $m \times n$ matrix of rank $k$ is equivalent to the canonical form with $I_k$ in the upper-left and zeros elsewhere
- Equivalence corresponds to changing both the domain and codomain bases of a linear transformation
- Similarity is a stricter relation (same basis change on both sides, only for square matrices)

See child nodes for detailed properties and theorems.