# Create a Householder matrix in LaTeX

I have difficulties to create a Householder matrix.

  M = \left(
\begin{array}{c | c c c c}
1 & 0 & 0 & 0 & 0 \\ \hline
0 &  \\
0 & H_{u} \in \mathbb{R}^{4 \times 4} \\
0 &  \\
0 &  \\
\end{array}
\right)


• You can use nicematrix package. Jan 1 at 21:14
• Thanks, I never used Jan 1 at 21:16
• @Gianni Spear What does the final outcome have to look like ? or is it about the zeros placement on the top line ? Jan 1 at 21:19
• Hey. The final outcome is a matrix with Hu in R^{4 x 4} centered and the first row of zeros in order (i.e., with equal spaces) Jan 1 at 21:22
• @Sebastiano it'd be great to see an answer using the nicematrix package, if you have time :) Jan 2 at 10:33

\documentclass{article}
\usepackage{amssymb,amsmath,multirow}

\begin{document}

$M = \left( \begin{array}{c | c c c c} 1 & 0 & 0 & 0 & 0 \\ \hline 0 & \multicolumn{4}{c}{\multirow{4}{*}{H_{u}\in\mathbb{R}^{4\times4}}} \\ 0 & \\ 0 & \\ 0 & \\ \end{array} \right)$

\end{document}


Nest matrix inside array:

\documentclass{article}
\usepackage{amsmath,amssymb}

\newcommand{\RR}{\mathbb{R}}

\begin{document}

$M=\left( \begin{array}{c | c} 1 & \begin{matrix} 0 & 0 & 0 & 0 \end{matrix} \\ \hline \begin{matrix} 0 \\ 0 \\ 0 \\ 0 \end{matrix} & H_u\in\RR^{4\times 4} \end{array} \right)$

\end{document}


Use:

\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{nicematrix}

\begin{document}

$M=\begin{pNiceArray}{c|cccc}[margin] 1 & 0 & 0 & 0 & 0\\ \hline 0 & & & &\\ 0 & \Block[l]{3-3}<\large>{H_{u}\in\mathbb{R}^{4\times4}}& & &\\ 0 & & & &\\ 0 & & & & \end{pNiceArray}$

\end{document}


• Nicely done :) +1 from me Jan 2 at 12:31
• +1: Same from me Jan 3 at 3:01
• @Dr.ManuelKuehner Thank you very much and my sincere best regards. Jan 3 at 11:06