Suppose I am trying to estimate a multiple linear regression with $k$ regressors and I have $n$ observations
$$Y = X\beta + \epsilon$$
Where $\beta \in \mathbb{R}^k$ and $X \in \mathbb{R}^{k \times n}$.
The typical solution for the estimate of $\beta$ is written as $\hat\beta = (X^TX)^{-1}X^TY$. What I would like is a general expression for the estimator of $\beta_1$ given $n$ observations, this - an expression for $\beta_1$$\hat \beta_1$, which is only one of the coefficients in $\beta$$\hat\beta$.
A solution for two predictors has been given in this question. This questions ask for a formulation of the expression when there are more than two predictors.
I have split the above equation like
$$Y = \beta_0 + X_1\beta_1 + X_2\cdot\beta_2 + \epsilon$$
where $\beta_0, \beta_1, X_1 \in \mathbb{R}$$\beta_0, \beta_1 \in \mathbb{R}$, $\beta_2 \in \mathbb{R}^{k-1}$, $X_1 \in \mathbb{R}^n$ and $\beta_2, X_2 \in \mathbb{R}^{k-1}$$X_2 \in \mathbb{R}^{(k-1) \times n}$.
I have tried working with the matrix formulation, and also the method where I regress $Y$ on $X_2$, then $X_1$ on $X_2$ and then regress the residuals from the first regression on the residuals from the second regression, and then tried to work out an expression for $\hat{\beta_1}$ from that, but this is still incredibly messy.
I was just curious if there is a known expression for a single coefficient in a multiple regression (or if there is some easier way to derive it), which would save me a ton of time.