X contains all realisations of the K+1 regressors. Each row i∈[1,n] of X gives the values of all regressors for observation i. Each column k∈[2,K+1] of X gives all the realisations of the variable Xk-1 across all observations.
We have that: SSR(β) = (Y - Xβ)'(Y - Xβ), The OLS estimate of β is the value β̂ minimising SSR(β). The first order condition reads:
X'(Y - Xβ) = 0 ⇔ X'Y = X'Xβ̂
Then if the matrix X'X is invertible (meaning X has full rank), we have the closed-form expression of the OLS estimator.