Showing 2 matrices span the same subspace?

1.5k Views Asked by At

Lets say we have a $m \times n$ matrix $A$ and a $m \times n$ matrix $B$. $A$ and $B$ span the same subspace if and only if there is a $n \times n$ matrix $C$ such that $B$ = $AC$.

  1. Show that $A$ and $B$ span the same subspace if and only if there is a matrix $C$ such that $ \|B - AC\|_2^2 = 0$.

  2. Given $A$ and $B$, is it true that you can use linear regression to see if those 2 matrices span the same subspace?

I'm a bit lost here. I thought the only way to show that 2 matrices span the same subspace is to show they have the same column space, but I don't see how that can be demonstrated with the information given.

1

There are 1 best solutions below

0
On

You don't mean "$A$ and $B$ span the same subspace", you mean the columns of $A$ and $B$ span the same subspace, i.e. the column space of $A$ is the column space of $B$.

Your condition should be that there is an invertible $n \times n$ matrix $C$ such that $B = AC$. To see this, note that each column of $AC$ is a linear combination of the columns of $A$ with coefficients given by the entries of the corresponding column of $C$. Moreover, if $B = AC$, $A = B C^{-1}$.

(2) is really just the same (again with the stipulation that $C$ is invertible), because $\|B - AC\|_2^2 = 0$ means that every entry of $B-AC$ is $0$.

(3) could run into a bit of a problem if done in the obvious way, because you don't know if the $C$ you get from linear regression will be invertible. Maybe better to first find a basis of the column space of each matrix.