# Finding two different matrices that have the same product with another one? (AB=AC)

Say you have a matrix, $A$, and you want to find two matrices $B, C$ for which $AB=AC$, but being $B\neq C$. I know this is quite possible due to matrices' nature, but I can't quite find a method to find them except for just random search.

i.e. Say $A = \begin{pmatrix} 1&1&1&1\\ 1&2&3&4\\ 2&4&4&6 \end{pmatrix}$

You can probably use some linear combination trick, either with rows or columns; or by creating a template matrix with a parameter that doesn't intervene on the final result, and hence you would be able to find infinite examples; but I'm unable to find a method for either of these ways.

I'm not looking for a particular solution, but rather for a method that would allow you to find them, I don't mind the result as long as I learn how to do it.

Anyway, thanks in advance. Any help appreciated.

-

## 1 Answer

You need to find a matrix whose column vectors are in the nullspace of $A$. Say that $\{v_1,\dots,v_n\}$ span the nullspace of $A$. Then, choose any matrix $D$ and construct any matrix $E$ whose column vectors are linear combinations of $\{v_1,\dots,v_n\}$ (you need to pick $D$ and $E$ to be of appropriate dimension). Then,

$$A(D+E)=AD+AE=AD.$$

This gives you your "infinite source" of $B$s and $C$s. You can compute $v_1,\dots,v_n$ simply solving a system of linear equations, see here.

-
Thanks for your answer jkn, really appreciated! I'm going to get down to work, might take some time but I hope I'll succeed, I'll feedback :P –  LMartin Oct 22 '13 at 21:59
You're welcome, good luck –  jkn Oct 22 '13 at 22:03
Sorry for taking so long to answer, but it worked perfectly, thanks again. After understanding everything now it all makes sense ;) Consider this question solved. –  LMartin Oct 22 '13 at 22:48
Glad to hear--and don't apologise: 30 min (or for that matter days) is a totally reasonable amount of time to think about something and reply. –  jkn Oct 22 '13 at 23:26