How to find closest approximation to a matrix multiplied by a scalar

58 Views Asked by At

I have a simple problem:

a x M is close to N

How to find the scalar a so that the two matrices, M and N are close to each other?

The metric is L2 norm. Any pointers to other norms would be helpful as well, in general if the approximation would still be useful and easily approximated.

1

There are 1 best solutions below

1
On

we want to minimize $\sum\limits_{i,j} (aM_{ij} - N_{ij})^2 = \ a^2(\sum\limits_{i,j} M_{ij})- 2a\sum\limits_{i,j}M_{i,j}N_{i,j} + \sum\limits_{i,j} N_{ij}$.

So this is just an expression of the form $a^2c_2 + ac_1 + c_0$ which clearly occurs when $a = - \frac{c_1}{2c_2}$