I am doing this little manipulation on Matlab and I really don't understand why it doesn't work. Here it is:
First I generate a $1\times400$ vector A, and a $400\times3$ matrix C. Then I generate a $1\times3$ vector B by
$B=AC$
Now my aim is to express A as a function of B. First I tried this:
$A=BC^{T}(CC^{T})^{-1}$
But the matrix $CC^{T}$ is not invertible, its determinant is always zero, whatever the initial $C$ matrix (at least numerically). So I tried using the pseudo inverse of $C$, (function pinv() in Matlab, which uses singular value decomposition). I get some matrix $C^{+}$ and I'm hoping to express A like
$A=BC^{+}$
But it doesn't work! If I compute the right-hand side of this equation (using my newly found $C^{+}$) I don't get A at all!
Would anybody know how I could express A as a function of B with a suitable matrix?
Thank you!
EDIT: I know from elsewhere (for physical reasons) that $A$ can only be a linear combination of three elementary vectors ($1\times400$), which weights are the elements of $B$. So it seems legitimate that I should be able to express $A$ like $A=BM$, with some matrix $M$ containing the three elementary vectors in question. But I can only experimentally relate $A$ and $B$ the other way round, as $B=AC$. So I am trying to retrieve the $M$ matrix from $C$.
A and B are physical quantities in my initial problem, the above manipulation was just an attempt to illustrate it and make things clearer. But maybe it was a source of confusion as it seems not to be possible in the general case!
If $C$ has rank $3$ then take $$A = B (C^{\mathrm{T}} C)^{-1} C^{\mathrm{T}}.$$ Then $A C = B$. As pointed out in the comments, this is only a way to find a matrix $A$, since there are many that satisfy this equation.