# Least squares - why multiply both sides by the transpose? [duplicate]

The formula:

$A^T(b - Ax) = 0\\ A^Tb = A^TAx\\ x = (A^TA)^{-1}A^Tb$

What is the reason for multiplying both sides by the transpose of A?

• Are you referring to the first equation? That is the least squares optimality condition. – Mark L. Stone Jun 23 '18 at 19:14
• Yes, as Mark said you need to have complete derivation of the normal equation to get solution for beta - vector. – Analyst Jun 23 '18 at 19:39
• I found the duplicates by searching; I know there are many more. – whuber Jun 23 '18 at 20:48