I have two data vectors $x$ and $b$ which are related to each other by the linear system of equations $Ax = b$, where $A$ represents a transfer matrix, $x$ represents the Stokes vector and $b$ represents the intensity vector of a polarimetric measurement. The ideal transfer matrix $A$ which relates $x$ to $b$ is given as:
$$A = \begin{bmatrix}0.5&0.5&0&0\\0.5&0&0.5&0\\0.5&-0.5&0&0\\0.5&0&-0.5& 0\end{bmatrix} \text{(For ideal case)}$$
Now, for each $x$ and $b$, I need to calculate an optimized transfer matrix using the relation $Ax = b$ where $A$ is the above ideal matrix.
What Optimization method is most suitable for this problem and what error metric I should use to optimize elements of $A$ after each iteration?