TITLE: Why does multiplying by $\textbf{A}^T$ make a previously unsolvable linear system solvable
QUESTION [6 upvotes]: Consider for instance the linear system:
$$\left(
\begin{array}{cc}
 1 & 2 \\
 3 & 4 \\
 5 & 6 \\
\end{array}
\right).\left(
\begin{array}{c}
 x \\
 y \\
\end{array}
\right)=\left(
\begin{array}{c}
 1 \\
 2 \\
 4 \\
\end{array}
\right)$$
This is over determined and thus has no solution. Yet, by simply multiplying both sides by $\textbf{A}^T$:
$$\left(
\begin{array}{ccc}
 1 & 3 & 5 \\
 2 & 4 & 6 \\
\end{array}
\right).\left(
\begin{array}{cc}
 1 & 2 \\
 3 & 4 \\
 5 & 6 \\
\end{array}
\right).\left(
\begin{array}{c}
 x \\
 y \\
\end{array}
\right)=\left(
\begin{array}{ccc}
 1 & 3 & 5 \\
 2 & 4 & 6 \\
\end{array}
\right).\left(
\begin{array}{c}
 1 \\
 2 \\
 4 \\
\end{array}
\right)$$
We find that the system now has a unique solution, which is the (x,y) that minimizes the squared error.
Now I understand the derivation of why multiplying by the transpose helps to find the pseudoinverse which then helps to perform OLS regression, but my question is perhaps a bit more fundamental. 
How can multiplying both sides of an equation by a matrix change a system which previously had no solutions into one that has a unique solution? This seems to against what I assumed that the solutions to $\textbf{A}x = \textbf{B}$ were the same as the solutions to $\textbf{P}\textbf{A}x = \textbf{P}\textbf{B}$.

REPLY [2 votes]: A general principle (some would say "tautology") connecting sets and their defining properties is as follows:
Let $E_1 := \{x | p_1(x)\} $ (with the meaning "$x$ has property $p_1$") and  $E_2 := \{x | p_2(x)\} $.
$$\text{If}  \  \forall x, (\ p_1(x) \implies p_2(x)), \ \  \text{then} \ \  E_1 \subset E_2$$
Here, as $AX=B \implies A^TAX=A^TB$, the set $E_1$ of solutions of equation $AX=B$ is included into the set $E_2$ of solutions of  $A^TAX=A^TB$.
Rather often (as in the case shown in your question), $E_1=\varnothing$ whereas $E_2 \neq \varnothing$. 
But what we have shown explains that this is not contradictory.