2

I was wondering how to partition a matrix with lines as shown in the picture. IF this a repeat of another question, THEN please do give me the link and I will delete mine. enter image description here

Thank you!

2 Answers2

2

This is how you do it in your case.

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{arydshln}

\begin{document}

[\left( \begin{array}{c;{2pt/1pt}c} & a_1 \ d(f_0)_{x_0} & \vdots \ & a_1 \ \hdashline[2pt/1pt] 0 \dots 0 & 1 \end{array} \right)]

\end{document}

enter image description here

AboAmmar
  • 46,352
  • 4
  • 58
  • 127
1

With {pNiceArray} of nicematrix (≥ 6.10a of 2022-06-26).

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

\NiceMatrixOptions { custom-line = { letter = : , % <- for the vertical rules command = hdashedline , % <- for the horizontal rules tikz = dashed , total-width = \pgflinewidth % <- optional } }

\begin{document}

[ \begin{pNiceArray}{ccc:c} \Block{3-3}{d(f_0)_{x_0}} & & & a_1 \ & & & \Vdots \ & & & a_1 \ \hdashedline 0 & \Ldots & 0 & 1 \end{pNiceArray} ]

\end{document}

You need several compilations (because of the PGF/Tikz nodes).

Output of the above code

F. Pantigny
  • 40,250
  • Nice! How do you make the 3 dots spaced apart like the picture? – TheGreatJRB Feb 22 '22 at 21:45
  • 1
    Instead of \Ldots (which is a command of nicematrix), you can use the classical \ldots and you will have three dots... – F. Pantigny Feb 22 '22 at 21:55
  • what about \vdots? they are not spaced like the ones in the textbook – TheGreatJRB Feb 24 '22 at 00:54
  • 1
    \Ldots, \Vdots and \Ddots are command of nicematrix which draws continuous dotted line accross multiple cells of the matrix. I've used them as illustration. You can use the classical \ldots, \vdots and \ddots if you want... – F. Pantigny Feb 24 '22 at 09:47