Rank of BA When AB Has Rank 2 in a 4×4 Setting
Statistics & ExperimentsModel answerLast updated
Given two 4×4 real matrices with rank(AB) = 2, find every integer value rank(BA) can take and construct matrices achieving each extreme.
Setup
Let A and B be real matrices of size 4 × 4. You are told that
rank(AB) = 2
Your job is to figure out exactly which integer values rank(BA) can take.
What you need to do
-
Identify the full set of achievable values. List every integer
rsuch that some pair(A, B)satisfiesrank(AB) = 2andrank(BA) = r. -
Prove the bounds. Use standard rank inequalities — the product rank bound and Sylvester's inequality — to show why no value outside your set is possible.
-
Construct witnesses for the extremes. For the smallest and largest achievable values, write down explicit
4 × 4matrices and verify bothrank(AB) = 2and thatrank(BA)hits the target.
What a complete answer looks like
- The exact set (not just bounds).
- A short derivation of each bound with the inequality spelled out.
- Concrete matrices for the minimum and maximum, with a check that they work.
- A brief note on why the value just outside your upper bound is impossible.
Hints
Hint 1
Let a = rank(A) and b = rank(B). Apply the product-rank bound rank(AB) ≤ min(a, b) to get a floor on both a and b, then apply Sylvester's inequality rank(AB) ≥ a + b − 4 to get a ceiling on their sum. Do the same steps for rank(BA) using the same a and b.
Hint 2
For the minimum: ask whether BA = 0 is consistent with rank(AB) = 2. That happens when the image of A lands entirely inside the kernel of B, while the image of B avoids the kernel of A. Try a = b = 2 with A and B chosen so their images and kernels are complementary subspaces.
Hint 3
For the maximum: you need a = b = 3. Sylvester then gives rank(AB) ≥ 3 + 3 − 4 = 2, which matches the constraint, so it is not ruled out. Build B so that exactly one dimension of its image falls into ker A (reducing AB's rank to 2), while none of A's image falls into ker B (keeping rank(BA) as high as possible).
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Answer
rank(BA) can equal any integer in {0, 1, 2, 3}. Rank 4 is impossible; every value from 0 through 3 is achievable.
Deriving the bounds
Write a = rank(A) and b = rank(B). Two inequalities do all the work:
- Product bound:
rank(XY) ≤ min(rank X, rank Y) - Sylvester's inequality (n = 4):
rank(XY) ≥ rank X + rank Y − 4
What rank(AB) = 2 forces on a and b:
- From the product bound:
2 ≤ min(a, b), soa ≥ 2andb ≥ 2. - From Sylvester:
2 ≥ a + b − 4, soa + b ≤ 6.
Lower bound on rank(BA): Sylvester gives rank(BA) ≥ a + b − 4. With a = b = 2 this is 0, so BA = 0 is not ruled out.
Upper bound on rank(BA): Let r = rank(BA). The product bound gives r ≤ min(a, b), so a + b ≥ 2r. Feeding that into Sylvester applied to AB:
2 = rank(AB) ≥ a + b − 4 ≥ 2r − 4
This gives 2r ≤ 6, so r ≤ 3.
Why rank 4 is impossible: rank(BA) = 4 would require both A and B to be invertible, but invertible matrices satisfy rank(AB) = 4, contradicting the constraint.
Constructions
Throughout, E_{ij} is the matrix with a 1 in row i, column j and zeros elsewhere.
Minimum: rank(BA) = 0
The strategy is to make the image of A lie entirely inside the kernel of B, so BA = 0, while keeping the image of B away from the kernel of A, so AB retains rank 2.
Take a = b = 2:
B = diag(1, 1, 0, 0) # projects onto span(e1, e2), kernel = span(e3, e4)
A = E31 + E42 # maps e1 → e3, e2 → e4; image = span(e3, e4)
AB: B first fixes e1 and e2 (kills e3, e4), then A maps them to e3 and e4. Sorank(AB) = 2. ✓BA: A's image isspan(e3, e4)= ker B, soBA = 0,rank(BA) = 0. ✓
Maximum: rank(BA) = 3
Now take a = b = 3. Sylvester allows rank(AB) ≥ 2, so rank 2 is still consistent.
A = diag(1, 1, 1, 0) # kernel = span(e4)
B = E11 + E22 + E43 # maps e1→e1, e2→e2, e3→e4, e4→0
-
AB: trace through each basis vector.- e1 → B → e1 → A → e1
- e2 → B → e2 → A → e2
- e3 → B → e4 → A → 0 (e4 is in ker A)
- e4 → B → 0
So
rank(AB) = 2. ✓ -
BA:- e1 → A → e1 → B → e1
- e2 → A → e2 → B → e2
- e3 → A → e3 → B → e4
- e4 → A → 0
Image of BA is
span(e1, e2, e4), sorank(BA) = 3. ✓
Intermediate values
- rank 2:
A = B = diag(1, 1, 0, 0). Both products equaldiag(1, 1, 0, 0), rank 2. - rank 1: Take
A = E11 + E32andB = diag(1, 1, 0, 0).- AB: e1 → e1, e2 → e3, so
rank(AB) = 2. ✓ - BA: e1 → e1, e2 → B·e3 = 0, so
rank(BA) = 1. ✓
- AB: e1 → e1, e2 → e3, so
The key structural insight
There is a cleaner way to think about why the two ranks can differ. Define the "rank loss" of each product:
rank(AB) = rank(B) − dim(im B ∩ ker A)
rank(BA) = rank(A) − dim(im A ∩ ker B)
The two products lose rank through different intersections — one is im B ∩ ker A, the other is im A ∩ ker B. There is no reason these intersections should have the same dimension, so the two ranks can genuinely diverge. The constructions above are built exactly by engineering one intersection to be large and the other to be trivial.
Common mistakes
- Assuming rank(AB) = rank(BA). This is false for rank. It is true that AB and BA share the same nonzero eigenvalues (and even the same characteristic polynomial for square matrices), but their rank — equivalently, the size of their zero eigenspace — can differ.
- Only applying Sylvester in one direction. The upper bound
r ≤ 3requires applying Sylvester to AB after expressinga + bin terms ofr. Using just the product bound gives the weakerr ≤ 4. - Claiming the minimum is 2 by symmetry. Symmetry of eigenvalues does not extend to rank. The BA = 0 example is a concrete refutation.
- Stating bounds without constructing witnesses. A claimed minimum of 0 is meaningless unless you produce matrices that achieve it.