Imagine the following problem: we have a set of n matrix equations in the form of :

[b1] = [A] * [b0]

[b2] = [A] * [b1]

etc.

vertical vectors [b0], [b1], ... are GIVEN. We try to estimate matrix A. As there are many equations (more than cells in matrix A) the system has no solutions.

Is there any method that would allow to concisely write target function to estimate A by, for instance, minimizing sum of squares or applying other optimization technique?

([b1] - [A] * [b0])^2 + ([b2] - [A] * [b1])^2 + ... -> minimize

I have to input explicitly and symbolically the derivative of target function to the software.

Kind regards and thanks for help

J