# [Tex/LaTex] How to add dash lines in Matrix

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

Cheers

S.L.

\documentclass{article}
\usepackage{amsmath}

\begin{document}
$$\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{document}


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

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

\begin{document}

$$\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{document}


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