$A^\mathrm{T}A=B^\mathrm{T}B \Leftrightarrow \exists$ orthogonal $Q$ such that $A=QB$? Assume $A,B \in \mathbb{R}^{m\times n}$, how can you prove the following:
$A^\mathrm{T}A=B^\mathrm{T}B \Leftrightarrow \exists$ orthogonal $Q$ such that $A=QB$
or is there a counterexample? Intuitively it makes sense to me, but I haven't found a nice proof yet. I have tried it through using SVD, but the non-uniqueness of the decomposition makes problems. I would be happy for some suggestions!
 A: $\Leftarrow$ is trivial.
for $\implies$:
consider $A = (A_1, \dots A_d)$ as a family of columns.
Then the hypothesis writes $A_i\cdot A_j = B_i\cdot B_j$.
Consider a subfamily that generates $\text{span }\{A_k\}$. 
You can find a set $I$ such as $\text{span }\{A_k\} = \text{span }\{A_i, i\in I\} $.
As for every matrix $C$, $\text{rank }C = \text{rank }C^TC$,
you get that $
\{B_i, i\in I\}
$ is a basis of $\text{span }\{B_k\}$.
Eventually,
consider the linear map
$$
f: \text{span }\{B_k\}\to \text{span }\{A_k\}
\\
i\in I \implies f(B_i) = A_i
$$
This is an orthogonal transformation and you can define it in any way to $R^d$, keeping the orthogonality. Its matrix $Q$ is such as $QB = A$.
A: As a preparation for my exam, I tackled the problem of solving this old (and not quite resolved) question and came up with a nice solution. I hope the people who stared the problem will like the answer :).
Let's prove a more general theorem: 
Let $A: V \rightarrow W$  and $B: V \rightarrow W$ be linear operators on finite-dimensional inner-product spaces over $\mathbb{R}$ or $\mathbb{C}$. Then the following holds:

$A^{*}A = B^{*}B \Leftrightarrow \exists U: W \rightarrow W$ s.t. $U^*U = I_{W}$ and $UA = B$

Proof: 
$\Leftarrow$: is trivial.
$\Rightarrow$: Using the Polar-Decomposition theorem, we know that 
$A = U_A (A^*A)^\frac{1}{2}$ and $B = U_B(B^*B)^\frac{1}{2}$, where ${U_A}^{*}U_A = {U_B}^{*}U_B = I_W$. Now, since $B^*B = A^*A$, we have $U_B{U_A}^*A = U_B{U_A}^*U_A (A^*A)^\frac{1}{2} = U_B (A^*A)^\frac{1}{2} = U_B (B^*B)^\frac{1}{2} = B$. Thus, per construction we found our desired $U$ to be $U = U_B{U_A}^*$.
