Suppose $M$ is an invertible matrix with a $QR$ decomposition. Because $M$ is invertible this $QR$ decomposition will be unique. I want to show it is unique via a least squares problem.
Say $Ax = b$ and as $A$ is invertible we will have an exact solution for the least squares problem. This (I think) should ultimately lead to showing $Q$ and $R$ are unique in the $QR$ decomposition of $A$. An exact solution means there exists $x$ such that $\Vert Ax - b \Vert_2 = 0$. Rewriting as
$$\Vert QRx - b \Vert_2 = 0$$
Ortogonal transformations are invariant under the 2-norm so multiplying by $Q^T$ gives
$$\Vert Rx - Q^Tb \Vert_2 = 0$$
Well that's as far as I got. I don't know if I'm even on the right track. Any ideas how to show the $QR$ decomposition is unique (via least squares) or is this actually not possible?