# Thread: Solve A in Ax = b

1. ## Solve A in Ax = b

If I have to vectors x and b, how can I solve matrix A in Ax = b? Or is this not possible?

Eg:

Code:
Ax = b
[a0, a1, a2, a3][x] = [x']
[b0, b1, b2, b3][y]   [y']
x, y, x' and y' are known. Is it possible to get a0-a3 and b0-b3?

Thanks

2. ## Re: Solve A in Ax = b

\displaystyle \displaystyle \begin{align*}\mathbf{Ax} &= \mathbf{b} \\ \mathbf{A}^T\mathbf{Ax} &= \mathbf{A}^T\mathbf{b} \\ (\mathbf{A}^T\mathbf{A})^{-1}\mathbf{A}^T\mathbf{Ax} &= (\mathbf{A}^T\mathbf{A})^{-1}\mathbf{A}^T\mathbf{b} \\ \mathbf{x}&= (\mathbf{A}^T\mathbf{A})^{-1}\mathbf{A}^T\mathbf{b}\end{align*}

3. ## Re: Solve A in Ax = b

Thank you. I'll try that.

4. ## Re: Solve A in Ax = b

I have also realised that your matrix equation as written makes no sense, as the dimensions of the matrices $\displaystyle \displaystyle A$ and $\displaystyle \displaystyle x$ don't allow multiplication. Are you sure the equation wasn't

$\displaystyle \displaystyle \left[\begin{matrix}a_0 & b_0 \\ a_1 & b_1 \\ a_2 & b_2 \\ a_3 & b_3\end{matrix}\right]\left[\begin{matrix}x \\ y\end{matrix}\right] = \left[\begin{matrix}c_0 \\ c_1 \\ c_2\\ c_3\end{matrix}\right]$

because that WILL work...

5. ## Re: Solve A in Ax = b

Thought I did something wrong. Thanks man

6. ## Re: Solve A in Ax = b

I've now managed to compute x. Is there any way of getting A when I have x and b available?

7. ## Re: Solve A in Ax = b

Use a similar method - postmultiply both sides by $\displaystyle \displaystyle \mathbf{x}^T$ in order to create a square matrix, then postmultiply both sides by $\displaystyle \displaystyle (\mathbf{xx}^T)^{-1}$ in order to get rid of the $\displaystyle \displaystyle x$ terms.

8. ## Re: Solve A in Ax = b

Oh, that simple. Thank you very much