# Multiline curly braces

I know how to draw the following multiline matrix using brackets on both sides:

$$\begin{bmatrix}1&5&-3\\-2&-13&8\\3&-3&1\end{bmatrix}$$


The question is, how do I do it with curly braces? I know how to do curly braces on the left side (using cases), but how do I get the curly braces on both sides? I'm writing this in the Jupyter notebook version 5.7.8.

• Don't use . Jan 5, 2020 at 17:19
• So how do I do in-line math-mode (equivalent to \$)? Jan 5, 2020 at 17:29

With Bmatrix from amsmath:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

$\begin{Bmatrix} 1 & 5 & -3 \\ -2 & -13 & 8 \\ 3 & -3 & 1 \end{Bmatrix}$

\end{document}


Anothers possibility on the off-chance that something was going wrong during compilation is to use nicematrix or spalign package where you can easily align minus sign easily: option l left, c center and r right.

\documentclass[a4paper,12pt]{article}
\usepackage{nicematrix}
\usepackage{verbatim}
\usepackage{spalign}
\begin{document}
$\begin{BNiceMatrix} 1 & 5 & -3 \\ -2 & -13 & 8 \\ 3 & -3 & 1 \end{BNiceMatrix} \quad \verb|with nicematrix package|$
\spaligndelims \{\} \spalignmat[r]{1 5 -3; -2 -13 8; 3 -3 1} \quad \verb|with spalign package|
\end{document}

• an upvote for sharing about the package spalign, Jan 6, 2020 at 8:57
• @MadyYuvi Ahahaha :-) for me it is important to help the others....and that exists the sincerity and the semplicity from the people..like you. Jan 6, 2020 at 11:49

As other have said, the Bmatrix environment from amsmath is probably the best solution here, but I think it's worth to keep in mind that a similar result can be achieved by adding \left\{...\right\} around a matrix environment.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$\begin{Bmatrix}1&5&-3\\-2&-13&8\\3&-3&1\end{Bmatrix} \qquad \left\{ \begin{matrix}1&5&-3\\-2&-13&8\\3&-3&1\end{matrix} \right\}$
\end{document}


This solution can easily be adapted for any kind of braces, or with different braces on both sides, or even to give the matrix a brace on only one side.