I want to create the matrix shown bellow in Latex.
I have the horizontal curly brackets figured out, I can use undermat{}{}
for that. I do not however know how to insert the vertical curly brackets around row 1 and rows 2-4, or how to insert the centered caption bellow the array.
Can someone please help me do this?
Here is my code so far with the horizontal curly brackets.
\documentclass{article}
\newcommand\undermat[2]{%
\makebox[0pt][l]{$\smash{\underbrace{\phantom{%
\begin{matrix}#2\end{matrix}}}_{\text{$#1$}}}$}#2}
\begin{document}
$$
\left [
\begin{array}{cccccccc}
1.2 & 1.4 & 3.2 & 4.1 & 6.3 & 7.1 & 9.4 & 2.5 \\
1.2 & 1.4 & 3.2 & 4.1 & 6.3 & 7.1 & 9.4 & 2.5 \\
1.2 & 1.4 & 3.2 & 4.1 & 6.3 & 7.1 & 9.4 & 2.5 \\
\undermat{T1}{1.2 & 1.4 & 3.2} & \undermat{T2}{1.2 & 1.4 & 3.2} & \undermat{T3}{9.4 & 2.5} \\
\end{array}
\right ]
$$
\end{document}
Best Answer
Here's one way, using regular extensible braces:
Note the use of
@{}
to remove inter-column spacing. You may want to move the left construction closer to the matrix on the right using@{\hspace{-1ex}}
(say). Your choice.Since
\undermat
sets\underbrace
s that are\smash
ed, they add no vertical height to the matrices and therefore allows for the\left[
...\right]
construction to span only the visible matrix entries. However, this could cause the\undermat
s to run into content following the equation. To avoid this, we place the entire structure inside anotherarray
and add a blank line at the bottom. This allows the\smash
ed\undermat
s to have some whitespace to sink into.