Skip to main content
1 of 2
Federico Poloni
  • 20.2k
  • 2
  • 82
  • 120

You can formulate this problem as an orthogonal Procustes problem: $$ \min_{X \text{ orthogonal}} \|AX-B\|_F. $$

Converting from the notation in the Wikipedia page to this form, the solution is $X=UV^T$, where $A^TB = U\Sigma V^T$ is an SVD; a proof follows from manipulating the expression using the Frobenius (trace) inner product.

Federico Poloni
  • 20.2k
  • 2
  • 82
  • 120