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=โ100โ000โ000โโ>Example 1: Equivalent matrices
>B=โ100โ000โ000โโ>and
>A=[13โ24โ]>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=[13โ24โ]>Example 2: Similar matrices
>P=[11โ1โ1โ]>,
>Pโ1=[1/21/2โ1/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=[10โ00โ]>Example 3: Distinguishing equivalence and similarity
>B=[00โ01โ]>and
>P=[01โ10โ]>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=[01โ10โ][10โ00โ][01โ10โ]=[00โ01โ]=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โBโPBโBโฒโ | โ |
| **Change of basis for T:VโV ** | [T]Bโฒโ=Pโ1[T]BโP | โ |
8. ๐ Practice Questions
>A=[12โ24โ]>Q1: Are these similar?
>B=[00โ05โ]>,
>A=[10โ00โ00โ]>.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)1โdet(A)det(P)=det(A). โ Q3: Are these equivalent?
>B=[00โ10โ00โ]>,
>A=[10โ01โ]>.Solution: Both have rank 1 and are 2ร3. Yes, they are equivalent. Q4: Not similar โ different trace
>B=[10โ02โ]>,
>A=[21โ12โ]>.Solution: tr(A)=2, tr(B)=3. Not similar. Q5: Finding similar matrixFind B similar to
>P=[11โ1โ1โ]>using
>Pโ1=[1/21/2โ1/2โ1/2โ]>.Solution:
>B=Pโ1AP=[1/21/2โ1/2โ1/2โ][21โ12โ][11โ1โ1โ]>.
>=[1.50.5โ1.5โ0.5โ][11โ1โ1โ]=[30โ01โ]>
>A=[12โ21โ]>.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=[30โ0โ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