# Bracketed values with Mathjax

I would like to be able to produce something like this with Mathjax: i.e. two values bracketed together, one value on its own in the middle and two more values bracketed together.
Does anyone know the way?

The following:

$$\left.\begin{array}{c} 5\\ 6 \end{array} \right] \quad 2\quad \left[\begin{array}{c} 1\\ 2 \end{array}\right.$$

is produced by

$$\left.\begin{array}{c} 5\\ 6 \end{array} \right] \quad 2\quad \left[\begin{array}{c} 1\\ 2 \end{array}\right.$$


You can make the number smaller and/or add space by including blank lines, e.g. $$\left.\begin{array}{c} 5\\ \\ 6 \end{array} \right]\quad 2\quad \left[\begin{array}{c} 1\\ \\2 \end{array}\right.$$ just adds a blank line in the middle of the two arrays.

• Thanks very much (+1) The first version is ideal. – Peter Phipps Jan 15 '20 at 21:56
• @PeterPhipps: I trust you understand what the commands are doing, so that you can modify it at will. If you are unsure, just let me know. – Arturo Magidin Jan 15 '20 at 21:57
• Mathjax has support for the optional height argument to \\  , e.g. \\[2em] adds 2em of space – Calvin Khor Jan 18 '20 at 1:15

It isn't pretty, but:

$$\left. \begin{matrix} 5\\[5ex] 6 \end{matrix} \right] \begin{matrix} \\ 2 \\ \\ \end{matrix} \left[ \begin{matrix} 1 \\[5ex] 2 \end{matrix} \right.$$

$$\left. \begin{matrix} 5\\[5ex] 6 \end{matrix} \right] \begin{matrix} \\ 2 \\ \\ \end{matrix} \left[ \begin{matrix} 1 \\[5ex] 2 \end{matrix} \right.$$