I would like to create a partial block matrix, with two blocks on the bottom row, separated by a vertical line between them, and separated from the rest of the matrix by a horizontal line.
My first attempt captured the idea, but the alignment was lacking
\documentclass{article}
\usepackage{amsmath}
\newcommand{\bigzero}{\mbox{\normalfont\Large\bfseries 0}}
\newcommand{\bigid}{\mbox{\normalfont\Large\bfseries I}}
\begin{document}
\begin{equation*}
\begin{pmatrix}
\begin{matrix}
1 & x_0 & x_0^2 & \dots & x_0^n \\
& & \vdots & & \\
1 & x_m & x_m^2 & \dots & x_m^n \\
\end{matrix} \\
\hline
\begin{array}{c c | c c c}
\bigzero & & & \bigid_{n-m} &
\end{array}
\end{pmatrix}
\end{equation*}
\end{document}
Ideally, I would like a little more space between the horizontal line and the rows. Furthermore, the 0
should be centred between the first two columns, while the I
should be centred between the last three columns.
I was able to obtain a much better spacing using the nicematrix
package, however I have no idea how to produce the vertical line, which should join with the horizontal line but not spread into the first three rows.
\documentclass{article}
\usepackage{amsmath}
\usepackage{nicematrix}
\newcommand{\bigzero}{\mbox{\normalfont\Large\bfseries 0}}
\newcommand{\bigid}{\mbox{\normalfont\Large\bfseries I}}
\begin{document}
\begin{equation*}
\begin{pNiceArray}{CCCCC}
1 & x_0 & x_0^2 & \cdots & x_0^n \\
& & \Vdots & & \\
1 & x_m & x_m^2 & \cdots & x_m^n \\
\hline
\Block{2-2}{\bigzero} & & \Block{2-3}{\bigid_{n-m}} & \\
& & & &
\end{pNiceArray}
\end{equation*}
\end{document}
{\bigid_{n-m})
instead of{\bigid_{n-m}}
.nicematrix
.