[Tex/LaTex] Labels and captions of a matrix matrices Can someone please let me know how to write the following equation in Latex. Thanks Best Answer With blkarray it is possible: \documentclass{article} \usepackage{amsmath,blkarray,booktabs} \newcommand{\cX}{\mathcal{X}} \newcommand{\fixhd}[1]{% \smash[#1]{\vphantom{\Big|}}% } \begin{document} \[ \begin{blockarray}{c ccccc c ccccc} & S_1 & \cdots & S_j & \cdots & S_N & & S_1 & \cdots & S_i & \cdots & S_N \\ \cmidrule{2-6} \cmidrule{8-12} \begin{block}{c [ccccc] c [ccccc]} T_1 & \fixhd{b} x_1 & \cdots & 0 & \cdots & 0 & T_{N+1} & 0 & \cdots & \cX_i^1 & \cdots & \cX_N^1 \\ \vdots & \vdots & \ddots & \vdots & \cdots & \vdots & \vdots & \vdots & \ddots & \vdots & \cdots & \vdots \\ T_j & 0 & \cdots & x_j & \cdots & 0 & T_{N+i} & \cX_1^i & \cdots & 0 & \cdots & \cX_N^i \\ \vdots & \vdots & \ddots & \vdots & \cdots & \vdots & \vdots & \vdots & \ddots & \vdots & \cdots & \vdots \\ T_N & 0 & \cdots & 0 & \cdots & x_N & T_{2N} & \cX_1^N & \cdots & \cX_i^N & \cdots & 0 \fixhd{t} \\ \end{block} \noalign{\vspace{-1.5ex}} & \BAmulticolumn{5}{c}{% \underbrace{\hphantom{\begin{bmatrix}x_1&\cdots&x_j&\cdots&x_N\end{bmatrix}}}% _{\text{Broadcasting phase}}% } && \BAmulticolumn{5}{c}{% \underbrace{\hphantom{\begin{bmatrix}\cX^N&\cdots&\cX^N&\cdots&\cX^N\end{bmatrix}}}% _{\text{Cooperation phase}}% } \\ \end{blockarray} \] \end{document} The \fixhd trick makes slightly bigger fences. Related Solutions[Tex/LaTex] Matrix in Latex You must read at least lshort (page 58) or amsldoc.pdf Section 4 (page 12). \documentclass{article} \usepackage{amsmath} \begin{document} \[ \begin{bmatrix} x_{11} & x_{12} & x_{13} & \dots & x_{1n} \\ x_{21} & x_{22} & x_{23} & \dots & x_{2n} \\ \hdotsfor{5} \\ x_{d1} & x_{d2} & x_{d3} & \dots & x_{dn} \end{bmatrix} = \begin{bmatrix} x_{11} & x_{12} & x_{13} & \dots & x_{1n} \\ x_{21} & x_{22} & x_{23} & \dots & x_{2n} \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ x_{d1} & x_{d2} & x_{d3} & \dots & x_{dn} \end{bmatrix} \] \end{document} Related Question
Best Answer
With
blkarray
it is possible:The
\fixhd
trick makes slightly bigger fences.