2

I often need to write matrices with big zeros and lines across the matrix.

enter image description here

  • Does there exist a package to do that easily?

  • What's your strategy or your good habits when you have to write such matrices?

Because, for me, it is always long and difficult and I am not always satisfied with the result.

Thanks for your help.

2 Answers 2

3

Here is a manual way

\documentclass[a4paper]{memoir}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
\usepackage{fix-cm}
\begin{document}
\[
BP=\left(
  \begin{array}{@{} c|c @{}}
    \begin{matrix}
      \quad\text{\fontsize{10mmm}{10mm}\selectfont$0$}\quad
    \end{matrix}
    &
    \begin{matrix}
      b_1\\\vdots\\b_{n-1} 
    \end{matrix}
    \\
    \hline
    & 0
  \end{array}
\right)
\]

\end{document}
1

With {pNiceArray} of nicematrix.

\documentclass[a4paper,12pt]{article}
\usepackage{geometry}
\usepackage{nicematrix}

\begin{document}

\[
BP = 
\begin{pNiceArray}{w{c}{15mm}|c}[margin=1pt]
\Block{3-1}<\Large>{0} & b_1 \\
                       & \Vdots \\
                       & b_{n-1} \\
\Hline
                       & 0 
\end{pNiceArray}
\begin{pNiceArray}{w{c}{15mm}|c}[margin=1pt]
\Block{3-1}<\Large>{Q} & 0 \\
                       & \Vdots \\
                       & 0 \\
\Hline
                       & 1 
\end{pNiceArray}
\]

\end{document}

Output of the above code

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .