# Maximizing inner product with an orthogonal matrix inside

Take given matrices $$A, B \in \mathbb{R}^{m \times n}$$. We want to find an orthogonal matrix $$Q$$ (in $$\mathbb{R}^{n \times n}$$) to maximize the inner product $$\langle A, QB \rangle$$.

So I know that if this problem were instead to find $$Q, R$$ to maximize $$\langle A, QBR \rangle$$, we would just take $$Q = U_A U_B^T$$ and $$R = V_B V_A^T$$ from the SVDs of $$A, B$$. That actually achieves the maximum $$\textrm{Tr}(\Sigma_A \Sigma_B)$$.

But I'm not sure how to proceed when $$B$$ is only multiplied from the left. I suspect that we would still take $$Q = U_A U_B^T$$ so the inner product is $$\textrm{Tr}(\Sigma_A \Sigma_B V_B^T V_A)$$, but I have no idea how to show that this is indeed the maximum. My thought is that $$V_B^T V_A$$ will always be in the inner product, but why?

Would really appreciate answers centered around the SVD, as well as general intutition here. Thank you!

• This is basically an orthogonal Procrustes problem and its answer is well-known: the optimal $Q$ is $VU^T$, where $USV^T$ is a SVD of $BA^T$. Commented Apr 27, 2023 at 2:26
• Oh, that makes a ton of sense! Just gotta rotate in the trace. Commented Apr 27, 2023 at 2:29
• There appears to be a typo in the sizes of your matrices. If $\ A\$ and $\ B\$ are $\ m\times n\$ matrices won't you need $\ Q\$ to be an $\ m\times m\$ matrix (rather than $\ n\times n\$) for the product $\ QB\$ to be well-defined? Commented Apr 27, 2023 at 2:40
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 14, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}