# If $A_1 x = b_1$ and $A_2 x = b_2$ with $b_1 = b_2$ have the same solution, how $A_1$ and $A_2$ are related?

I have been doing simulation of a system. The underlying system reduces to a linear system $A x = b$. For two systems with matrices $A_1$ and $A_2$, I am getting same solutions for $A_1 x = b$ and $A_2 x = b$ ($b = [0,0,1]$ is same in both cases). I thought that since solutions are the same, row reduced echelon forms of $A_1$ and $A_2$ must be the same (the other way is definitely true)! This is not the case. So I am wondering, given that I have not made any mistake in my simulations (and solutions by maxima CAS), what I can say about $A_1$ and $A_2$? In general I am asking this:

What is the relation between $A_1$ and $A_2$ if the solutions of system $[ A_1 \mid b ]$ and $[ A_2 \mid b ]$ are the same?

Update

Following two matrices have the same solution for $b = [ 0, 0, 1]$, all $a_{ij}$ are randomly chosen between 0 and 0.01. I have only simulated all systems for $b = [ 0, 0, 1]$.

                          [  a12     - a21      0   ]
[                         ]
(%o9)                     [ - a12  a23 + a21  - a32 ]
[                         ]
[   1        1        1   ]

[ a12 a23 + a12    - a21    - a21 a32 ]
[                                     ]
(%o10)              [     - a12      a23 + a21    - a32   ]
[                                     ]
[       1            1          1     ]


Their Echelon forms (as returned by maxima ).

                              [ 1  1      1     ]
[                 ]
[          a12    ]
(%o11)                        [ 0  1  --------- ]
[       a21 + a12 ]
[                 ]
[ 0  0      1     ]

[ 1  1          1         ]
[                         ]
[            a32 - a12    ]
(%o12)                [ 0  1  - --------------- ]
[         a23 + a21 + a12 ]
[                         ]
[ 0  0          1         ]


PS: I have passable knowledge of undergraduate linear algebra. Feel free to comment on vector spaces (or some other mathematical structures) spanned by $A_1$ and $A_2$. A quick glance in relevant chapters of Hoffman and Kunze did not reveal anything about this problem.

• If $b=0$ $A_1$ and $A_2$ are equivalent otherwise by $b=[0,0,1]$ the columns of $A_1$ and $A_2$ are free except the last . – Mojtaba Aug 10 '16 at 5:17

I don't think there is necessarily any meaningful relation between $A_1$ and $A_2$. They can be two different systems of linear equations with the same solution that happen to be resulted assuming the same $b$. Assume $b=(1, 1)$ and $x=(1, 0)$. How many $A$ can satisfy $Ax=b$?
• Is it possible to say something about the vector spaces spanned by $A_1$ and $A_2$? – Dilawar Aug 10 '16 at 5:03
• Does it happen for all $x$? – msm Aug 10 '16 at 5:10
• It only happens for $b = [0,0,1]$. I changed the values $b$ to be randomly generated and then solution were not the same (as expected). Now I know this is true only for the case when $b = [0,0,..,1]$ – Dilawar Aug 12 '16 at 8:14
• if it happens for all $x$ then the third row of $A_1$ should be the same of that of $A_2$. Otherwise, it has no specific meaning. – msm Aug 12 '16 at 9:43