Here is the math:
$$
X = \begin{pmatrix}
1 & 2600 & 3 & 20 \\
1 & 3000 & 4 & 15 \\
1 & 3200 & 3 & 18 \\
1 & 3600 & 3 & 30 \\
1 & 4000 & 5 & 8 \\
\end{pmatrix}, \quad Y = \begin{pmatrix}550000\\ 565000\\ 610000\\ 595000\\ 760000\end{pmatrix}
$$
import numpy as np
X = np.array([[1, 2600, 3, 20],
[1, 3000, 4, 15],
[1, 3200, 3, 18],
[1, 3600, 3, 30],
[1, 4000, 5, 8 ]])
Y = np.array([550000, 565000, 610000, 595000, 760000])
np.linalg.inv(X.T @ X) @ X.T @ Y
array([ 3.83725e+05, 1.37250e+02, -2.60250e+04, -6.82500e+03])
These are the results given in your linear regression model above.
Note that in some python versions ie 3.6.11 when you do $X^TY$ then you post multiply it to the matrix $(X^TX)^{-1}$ you get a funky result. ie:
np.linalg.inv(X.T @ X) @ (X.T @ Y)
array([-9446381.39872008, -17633.1771872 , 13819875.82048003, 997123.60544 ])
or even
np.linalg.solve(X.T @ X, X.T @ Y)
array([-9446381.39872008, -17633.1771872 , 13819875.82048003, 997123.60544 ])
Further check in python:
np.linalg.inv(X.T.dot(X)).dot(X.T.dot(Y))
array([-9446381.39872007, -17633.1771872 , 13819875.82048003, 997123.60544 ])
np.linalg.inv(X.T.dot(X)).dot(X.T).dot(Y) # Look at the paranthesis:
array([ 3.83725e+05, 1.37250e+02, -2.60250e+04, -6.82500e+03])
This has been fixed in later versions, eg 3.8. Therefore you might not be getting the correct results due to a bug in the python version you are using.
Using R, we end up with the same results.
X = array( c(1, 1, 1, 1, 1, 2600, 3000, 3200, 3600, 4000, 3, 4, 3, 3, 5,
20, 15, 18, 30, 8), dim = c(5, 4))
Y = c(550000, 565000, 610000, 595000, 760000)
solve(crossprod(X), crossprod(X, Y)) # solve(t(X) %*% X, t(X) %*% Y)
[,1]
[1,] 383725.00
[2,] 137.25
[3,] -26025.00
[4,] -6825.00
solve(t(X) %*% X) %*% t(X) %*% Y
[,1]
[1,] 383725.00
[2,] 137.25
[3,] -26025.00
[4,] -6825.00
Although this is the basic notion for linear regression, note that all the regression platforms do not try to compute the inverse of the matrix directly. This is due to the the process being so complex and expensive. Usually QR decomposition is employed.