This is my code for creating the matrix in Latex
\begin{equation}
G =
\begin{bmatrix}
g_0 \\ g_1 \\ . \\ . \\ . \\ g_k-1\\
\end{bmatrix}
=
\setcounter{MaxMatrixCols}{15}
\begin{bmatrix}
p_{0,0} & p_{1,0} & . & . & . & p_{0,n-k-1} & & & & 1 & 0 & . & . & . & 0 \\
p_{0,1} & p_{1,1} & . & . & . & p_{1,n-k-1} & & & & 0 & 1 & . & . & . & 0 \\
. & . & . & & & . & & & & . & . & . & & & . \\
. & . & & . & & . & & & & . & . & & . & & . \\
. & . & & & . & . & & & & . & . & & & . & . \\
p_{0,n-k-1} & p_{1,n-k-1} & . & . & . & p_{k-1,n-k-1} & & & & 0 & 0 & . & . & . & 1 \\
\end{bmatrix}
\end{equation}
How to add the underbrace for the highlighted part of the submatrix P ?
Thank you.