When dealing with regression, specifically the normal equation, it is derived via calculus, as it is here:
https://eli.thegreenplace.net/2014/derivation-of-the-normal-equation-for-linear-regression
But, I don't see where you even need calculus. Why not just do the following using basic matrix operations (assuming that $X^T X$ is invertible): $$ X\beta = y \\ X^T \cdot X\beta = X^T\cdot y \\ (X^T X)^{-1}\cdot X^T X\beta = (X^T X)^{-1}\cdot X^T y \\ \beta = (X^T X)^{-1}\cdot X^Ty \\ $$
Is there anything wrong with this?
One problem I have with this is: doesn't this imply that the resulting $\beta $ will make it so that the plane actually interpolates every point of $y$. This is often not the case when doing linear regression, so this is what seems weird.