I am working through a regression problem for a matrix of data that isn't full rank and has more features than observations. For these reasons, I'd like to use elastic net because of its $L1$ and $L2$ regularization parameters.
While I've already found tutorials on how to use elastic net in python in practice, I'm still trying to fully understand how the regularization parameters fit into the estimation of $\hat{\beta}_i$.
I know that in an OLS model the expanded matrix form of regression looks like the following: \begin{equation} {\begin{bmatrix} y_1 \\ \vdots \\ y_n \end{bmatrix}} = {\begin{bmatrix} x_{11} & \ldots & x_{1k} \\ \vdots & \ddots & \vdots \\ x_{n1} & \ldots & x_{nk} \end{bmatrix}} \,\cdot\, {\begin{bmatrix} \beta_1 \\ \vdots \\ \beta_k \end{bmatrix}} \,+\, {\begin{bmatrix} \epsilon_1 \\ \vdots \\ \epsilon_n \end{bmatrix}} \end{equation}
This notation is tremendously helfpul in trying to understand how we derive $\hat{\beta_i}$ under OLS. Is it possible to write elastic net in a similarly expanded form, or does that not work because of the $L1$ penalty on the loss? If it is possible, where and how would I add the $L1$ and $L2$ penalties to the OLS equation above?