Equivalent & Similar Matrices
1896 words
9 min read
Visual companion
Python
Type and operator map
Python Week 1: the first filter for runtime behavior
View
Revision summary
What this note is really saying
Short form
# Equivalent & Similar Matrices ## 🎯 Learning Objectives After this topic you will be able to: - Define equivalent matrices and similar matrices - Distinguish between equivalence and similarity - Find the relationship between matrices representing the same transformation - Compute similar matrices via $P^{-1}AP$ -...

Equivalent & Similar Matrices
🎯 Learning Objectives
After this topic you will be able to:
- Define equivalent matrices and similar matrices
- Distinguish between equivalence and similarity
- Find the relationship between matrices representing the same transformation
- Compute similar matrices via P−1AP
- Understand that similar matrices share eigenvalues, determinant, trace, and rank
📋 Prerequisites
- Matrix Representation (Week 6) — how matrices represent linear transformations
- Change of Basis (Week 6) — transition matrices
- Matrix Multiplication (Week 1) — necessary for P−1AP
1. Intuition: Same Map, Different Coordinates
When you change the coordinate system, the numbers describing a point change — but the point itself doesn't. Similarly, when you change bases, the matrix representing a linear transformation changes — but the transformation itself is the same.
(Diagram)
- Equivalent matrices: A and B represent the same T:V→W with different bases in domain and codomain
- Similar matrices: A and B represent the same T:V→V with different bases in the domain (same basis change for input and output)
2. Equivalent Matrices
2.1 Definition
>B=PAQ>Definition (Equivalent Matrices). Two m×n matrices A and B are equivalent if there exist invertible matrices P (m×m) and Q (n×n) such that:
Why this matters: A represents T:V→W in bases B,C. B represents the same T in bases B′,C′. Then P is the change-of-basis in W and Q is the change-of-basis in V:
2.2 Properties
| Property | Explanation |
|---|---|
| Rank preserved | rank(A)=rank(B) |
| Dimensions same | Both are m×n |
| Row/column operations | PAQ means row ops on A ( P ) and column ops on A ( Q ) |
| Equivalence is... | Reflexive, symmetric, transitive (an equivalence relation) |
Key theorem: Two m×n matrices are equivalent iff they have the same rank.
>A=100000000>Example 1: Equivalent matrices
>B=100000000>and
>A=[1324]>have rank 1, so they're equivalent.More interesting:
has rank 2. Any 2×2 matrix with rank 2 is equivalent to A (and to I2).
3. Similar Matrices
3.1 Definition
>B=P−1AP>Definition (Similar Matrices). Two n×n matrices A and B are similar if there exists an invertible matrix P such that:
Why this matters: A and B represent the same linear operator T:V→V in different bases. P is the change-of-basis matrix.
3.2 Properties of Similar Matrices
Similar matrices share many properties:
| Property | Why? |
|---|---|
| Same determinant | det(P−1AP)=det(P−1)det(A)det(P)=det(A) |
| Same trace | tr(P−1AP)=tr(A) |
| Same rank | rank(P−1AP)=rank(A) ( P is invertible) |
| Same eigenvalues | det(P−1AP−λI)=det(P−1(A−λI)P)=det(A−λI) |
| Same characteristic polynomial | det(P−1AP−λI)=det(A−λI) |
| Same nullity | dim(N(P−1AP))=dim(N(A)) |
What's NOT preserved:
- The eigenvectors change (they transform by P−1)
- The matrix entries themselves
>A=[1324]>Example 2: Similar matrices
>P=[111−1]>,
>P−1=[1/21/21/2−1/2]>, then
>B=P−1AP=[5−2−10]>.
(as computed in Week 6).Check: det(A)=−2, det(B)=0−(−2)(−1)=−2 ✓ tr(A)=5, tr(B)=5 ✓
4. Equivalence vs. Similarity
| Aspect | Equivalence | Similarity |
|---|---|---|
| Form | B=PAQ | B=P−1AP |
| Same transformation? | T:V→W | T:V→V (operator) |
| Bases | Different in domain & codomain | Same basis in domain & codomain |
| Matrix size | m×n (need not be square) | Square n×n |
| Key invariant | Rank | Rank, det, trace, eigenvalues, char poly |
>A=[1000]>Example 3: Distinguishing equivalence and similarity
>B=[0001]>and
>P=[0110]>are equivalent (both have rank 1).Are they similar? Check trace: tr(A)=1, tr(B)=1. Check determinant: det(A)=0, det(B)=0. Check eigenvalues: both have eigenvalues 0 and 1.They could be similar. Find P such that B=P−1AP:
>P−1AP=[0110][1000][0110]=[0001]=B>(swap basis vectors).
✓. Yes, they are similar.
5. Edge Cases & Gotchas
| Situation | What Happens |
|---|---|
| ** A and B are equivalent but not similar** | A is m×n , m=n , or they have different trace/det |
| ** A is diagonalisable** | A is similar to a diagonal matrix |
| Identity matrix | Only similar to itself (check: P−1IP=I ) |
| Zero matrix | Only similar to itself |
6. Common Pitfalls
❌ Pitfall 1: Confusing P−1AP with PAP−1
The order matters. P−1AP changes basis for vectors, then applies A, then changes back. PAP−1 does the opposite.
❌ Pitfall 2: Thinking "similar" means "equivalent"
Every similar pair is equivalent, but not vice versa (similar requires square matrices and preserves more properties).
❌ Pitfall 3: Forgetting P must be invertible
If P isn't invertible, B=P−1AP isn't defined (and PAP−1 doesn't capture the same transformation in a different basis).
7. Formula Summary Table
| Concept | Formula | Invariants |
|---|---|---|
| Equivalence | B=PAQ , P,Q invertible | Rank |
| Similarity | B=P−1AP , P invertible | Rank, det, trace, eigenvalues, char poly |
| **Change of basis for T:V→W ** | [T]C′←B′=PC′←C[T]C←BPB←B′ | — |
| **Change of basis for T:V→V ** | [T]B′=P−1[T]BP | — |
8. 📝 Practice Questions
>A=[1224]>Q1: Are these similar?
>B=[0005]>,
>A=[100000]>.Solution: tr(A)=5, tr(B)=5. det(A)=0, det(B)=0. Eigenvalues of A: det(A−λI)=(1−λ)(4−λ)−4=λ2−5λ=λ(λ−5). So eigenvalues are 0 and 5. Eigenvalues of B: 0 and 5.Yes, they could be similar (same eigenvalues). Q2: Similarity preserves determinantProve: If B=P−1AP, then det(B)=det(A).Proof: det(B)=det(P−1AP)=det(P−1)det(A)det(P)=det(P)1det(A)det(P)=det(A). ✓ Q3: Are these equivalent?
>B=[001000]>,
>A=[1001]>.Solution: Both have rank 1 and are 2×3. Yes, they are equivalent. Q4: Not similar — different trace
>B=[1002]>,
>A=[2112]>.Solution: tr(A)=2, tr(B)=3. Not similar. Q5: Finding similar matrixFind B similar to
>P=[111−1]>using
>P−1=[1/21/21/2−1/2]>.Solution:
>B=P−1AP=[1/21/21/2−1/2][2112][111−1]>.
>=[1.50.51.5−0.5][111−1]=[3001]>
>A=[1221]>.B is diagonal. det(B)=3=det(A) ✓, tr(B)=4=tr(A) ✓. Q6: Matrix equivalence classesHow many equivalence classes of 2×3 matrices are there?Solution: Equivalence is determined by rank. Rank can be 0, 1, or 2 (min(2,3) = 2). So 3 equivalence classes. Q7: Similarity preserves eigenvaluesShow that if λ is an eigenvalue of A, then λ is also an eigenvalue of B=P−1AP.Proof: If Av=λv, then B(P−1v)=P−1AP(P−1v)=P−1Av=P−1(λv)=λ(P−1v). So P−1v is an eigenvector of B with eigenvalue λ. ✓ Q8: Are A and AT similar?Is A always similar to AT?Solution: Yes! Every matrix is similar to its transpose. (This is a known theorem, though the proof uses Jordan canonical form.) Q9: Determining similarity by invariants
>B=[300−1]>,
. Are they similar?Solution: det(A)=1−4=−3, det(B)=−3 ✓. tr(A)=2, tr(B)=2 ✓. Eigenvalues: A has λ=3,−1 (since (1−λ)2−4=λ2−2λ−3=(λ−3)(λ+1)). B has eigenvalues 3, -1. Similar ✓. Q10: Non-square caseCan a 2×3 matrix be similar to a 3×2 matrix?Solution: No. Similarity is only defined for square matrices. Non-square matrices can be equivalent (if same rank) but not similar.
🔗 Cross-References
- Next topic: Affine Subspaces
- Week 12 (Eigenvalues): Diagonalisation is finding a similarity transformation to a diagonal matrix
- Week 8 (Orthogonal Transformations): Orthogonal similarity QTAQ where QT=Q−1
- BSCS2004 (ML Foundations): PCA uses similarity to diagonalise the covariance matrix Join Discord Previous6.2 Matrix RepresentationNext7.2 Affine Subspaces