[Tex/LaTex] Issue with putting a bracket delimited matrix inside another matrix

delimitersmatrices

I was trying to make this matrix delimited by brackets within another matrix. Here is what I've managed to do so far, but I'm not too sure if I'm using the right approach. I tried to use bmatrix earlier too but to no avail:

\begin{align}
\frac{\epsilon_{1}}{12h^2_{1}} 
    \begin{array}{c}
    \left[
    12 \\ -1 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0
    \right.
    \end{array}
     \begin{array}{c c c c c c c}
     \left[
        -24 & 12 & 0 & 0 & 0 & 0 & 0 \\
        16 & -30 & 16 & -1 & 0 & 0 & 0 \\
        -1 & 16 & -30 & 16 & -1 & 0 & 0 \\
        0 & -1 & 16 & -30 & 16 & -1 & 0 \\
        0 & 0 & -1 & 16 & -30 & 16 & -1 \\
        0 & 0 & -1 & & 16 & -30 & 16 \\
        0 & 0 & 0 & 0 & 0 & 12 & -24 \\
      \right]
      \end{array} 
      \begin{array}{ c }
       \left.
    0 \\ 0 \\ 0 \\ 0 \\ 0 \\ -1 \\ 12 
       \right]
       \end{array} \notag 
\end{align}

Note: I'm also having problems with adding the descriptive curly braces at the bottom of the matrix. Would be grateful if someone could help me out with that.

Matrix

Best Answer

You can use nested matrices:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation*}
\frac{\epsilon_{1}}{12h^2_{1}}
\begin{bmatrix}
\\[-2\jot]
\begin{matrix}
   12 \\ -1 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0
\end{matrix}
\underbrace{%
\begin{bmatrix}
  -24 & 12 & 0 & 0 & 0 & 0 & 0 \\
   16 & -30 & 16 & -1 & 0 & 0 & 0 \\
   -1 & 16 & -30 & 16 & -1 & 0 & 0 \\
    0 & -1 & 16 & -30 & 16 & -1 & 0 \\
    0 & 0 & -1 & 16 & -30 & 16 & -1 \\
    0 & 0 & -1 & & 16 & -30 & 16 \\
    0 & 0 & 0 & 0 & 0 & 12 & -24 \\
\end{bmatrix}
}_{L_1}
\begin{matrix}
    0 \\ 0 \\ 0 \\ 0 \\ 0 \\ -1 \\ 12 
\end{matrix}
\end{bmatrix}
\end{equation*}

\end{document}

The empty row (with some negative vertical spacing) ensures that the outer brackets are larger than the inner ones.

Don't use align for single line displays.

enter image description here

Related Question