0

My question is how to achieve this effect in LaTeX? I tried various combinations of \right and \left but it does not work.

enter image description here

EDIT

Adding the code:

    $[introduces]m$ = $\left[ 
    o_1 = \left\lbrack[o_1 
    \newline
    o_2
    o_3] \right\rbrack
    o_2 = \lbrack \rbrack
    \right]$
Cragfelt
  • 4,005

3 Answers3

4

You could use array nested in array, but in this case I believe aligned is better:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation*}
\left[
\begin{aligned}
o_1 & \mapsto
  \left[
  \begin{aligned}
  o_1 & \mapsto 1 \\
  o_2 & \mapsto 0 \\
  o_3 & \mapsto 0
  \end{aligned}
  \right]
\\
o_2 & \mapsto
  \left[
  \begin{aligned}
  o_1 & \mapsto 1 \\
  o_2 & \mapsto 1 \\
  o_3 & \mapsto 0
  \end{aligned}
  \right]
\\
o_3 & \mapsto
  \left[
  \begin{aligned}
  o_1 & \mapsto 0 \\
  o_2 & \mapsto 0 \\
  o_3 & \mapsto 1
  \end{aligned}
  \right]
\end{aligned}
\right]
\end{equation*}

\end{document}

enter image description here

Without overshooting:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation*}
\begin{bmatrix}
\begin{aligned}
o_1 & \mapsto
  \begin{bmatrix}
  \begin{aligned}
  o_1 & \mapsto 1 \\
  o_2 & \mapsto 0 \\
  o_3 & \mapsto 0
  \end{aligned}
  \end{bmatrix}
\\
o_2 & \mapsto
  \begin{bmatrix}
  \begin{aligned}
  o_1 & \mapsto 1 \\
  o_2 & \mapsto 1 \\
  o_3 & \mapsto 0
  \end{aligned}
  \end{bmatrix}
\\
o_3 & \mapsto
  \begin{bmatrix}
  \begin{aligned}
  o_1 & \mapsto 0 \\
  o_2 & \mapsto 0 \\
  o_3 & \mapsto 1
  \end{aligned}
  \end{bmatrix}
\end{aligned}
\end{bmatrix}
\end{equation*}

\end{document}

enter image description here

egreg
  • 1,121,712
3

Like this?

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{mathtools, booktabs}

\begin{document}

\[ \begin{bmatrix}
    \addlinespace
    \;o_1 & \longmapsto \begin{bmatrix}
      o_1 & \longmapsto 1 \\
      o_2 & \longmapsto 0 \\
      o_3 & \longmapsto 0
    \end{bmatrix}\;
    \\
    \addlinespace
    \;o_2 & \longmapsto \begin{bmatrix}
      o_1 & \longmapsto 1 \\
      o_2 & \longmapsto 1 \\
      o_3 & \longmapsto 0 \\
    \end{bmatrix}\;\\
    \addlinespace
    \;o_3 & \longmapsto \begin{bmatrix}
      o_1 & \longmapsto 0 \\
      o_2 & \longmapsto 0 \\
      o_3 & \longmapsto 1
    \end{bmatrix} \\
    \addlinespace
  \end{bmatrix}\; \]

\end{document} 

enter image description here

Bernard
  • 271,350
1

Arrays are more compact vertically and seem nice for this job. Adding @{~\mapsto~} to the column specification also saves some typing and makes the code cleaner.

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{equation*}
  \left[
    \begin{array}{c @{~~\mapsto~~} c}
      o_1 & \left[\begin{array}{c @{~\mapsto~} c}
      o_1 & 1 \\
      o_2 & 0 \\
      o_3 & 0
    \end{array} \right] \\ [1.5em]
      o_2 & \left[\begin{array}{c @{~\mapsto~} c}
      o_1 & 1 \\
      o_2 & 1 \\
      o_3 & 0 \\
    \end{array} \right]\\ [1.5em]
      o_3 & \left[\begin{array}{c @{~\mapsto~} c}
      o_1 & 0 \\
      o_2 & 0 \\
      o_3 & 1
    \end{array} \right] \\   
    \end{array} 
  \right]
\end{equation*}

\end{document}

enter image description here

AboAmmar
  • 46,352
  • 4
  • 58
  • 127