13

I would like to know how to add dash lines in Matrix (see figuge)

Cheers

S.L.

enter image description here

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\begin{equation}
\begin{bmatrix}
N & B_i \\
B_i^T & 0
\end{bmatrix}
\begin{bmatrix}
x_i\\
k
\end{bmatrix}
=\begin{bmatrix}
n\\
0
\end{bmatrix}
\text{ with } n = A^TPl
\end{equation}
\end{document}
12

If using array instead of bmatrix is possible, you can use arydshln package:

enter image description here

\documentclass{article}
\usepackage{amsmath}
\usepackage{arydshln}


\begin{document}

\begin{equation}
\left[
    \begin{array}{c;{2pt/2pt}c}
        N & B_i \\ \hdashline[2pt/2pt]
        B_i^T & 0 
    \end{array}
\right]
\left[
    \begin{array}{c}
        x_i \\ \hdashline[2pt/2pt]
        k
    \end{array}
\right]
=\left[
    \begin{array}{c}
        n \\ \hdashline[2pt/2pt]
        0
    \end{array}
\right]
\text{ with } n = A^TPl
\end{equation}

\end{document}

you can of course, modify options to achieve the look that you desire.

| improve this answer | |
  • 3
    How do you move the dashed line from the superscript, T? If you do move that dashed line, how do you then align all the horizontal dashed lines? – Joe Sep 27 '15 at 17:00
  • In my latex version I also have to load the "array" package. – jack Jun 9 at 6:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.