2

I would like to label rows and columns of my matrix with formulas and text. I've started with a version using bordermatrix.

\[ \underbrace{ \bordermatrix{ & \underset{\downarrow}{x} & \underset{\downarrow}{c} \cr
      (17') \rightarrow & \dfrac{n}{\eta \cdot \delta} & \dfrac{1}{\lambda}   \cr
      (16') \rightarrow & \dfrac{1-s_R}{\delta} & - \dfrac{\frac{\lambda-1}{\lambda}}{\rho + \frac{n}{\eta} - n} } }_{\text{coefficient matrix } \Delta} \cdot \begin{pmatrix} \widetilde{x} \\ \widetilde{c} \end{pmatrix} = \begin{pmatrix} 1 \\ 0 \end{pmatrix}   \]

enter image description here

But furthermore I need to

  • only apply the 1 big underbrace for the main matrix
  • apply similar braces for single rows and columns (additional or instead of the rightarrow/downarrow)

Thank you very much for advice.

2

1 Answer 1

2

Here is one option using \bordermatrix that provides what you're after:

enter image description here

\documentclass{article}

\usepackage{mathtools}

\begin{document}
\[
  \phantom{(17') \rightarrow\hspace{\arraycolsep}}% For correct horizontal spacing within display math \[ ... \]
  \underbrace{
    \bordermatrix{\hspace{-\arraycolsep} & 
        \overbrace{\hphantom{\dfrac{1-s_R}{\delta}}}^{x} & 
        \overbrace{\hphantom{- \dfrac{\frac{\lambda-1}{\lambda}}{\rho + \frac{n}{\eta} - n}}}^{c} \cr
      \hspace{-\arraycolsep}\mathllap{(17') \rightarrow} & \dfrac{n}{\eta \cdot \delta} & \dfrac{1}{\lambda}   \cr
      \hspace{-\arraycolsep}\mathllap{(16') \rightarrow} & \dfrac{1-s_R}{\delta} & - \dfrac{\frac{\lambda-1}{\lambda}}{\rho + \frac{n}{\eta} - n}
    }
  }_{\text{coefficient matrix $\Delta$}}
  \cdot
  \begin{pmatrix}
    \widetilde{x} \\
    \widetilde{c}
  \end{pmatrix} =
  \begin{pmatrix}
    1 \\ 0
  \end{pmatrix}
\]

\end{document}

\overbraces are stretched to the widest element in each column using \hphantom, while care is taken to remove the left-most row indices from the \underbrace yet restoring their horizontal space outside of the \bordermatrix construction.


For having left braces to identify/mark the rows, you could use the following:

enter image description here

\[
  \phantom{(17') \left\{\vphantom{\dfrac{n}{\eta \cdot \delta}}\right.\hspace{\dimexpr\arraycolsep-\nulldelimiterspace}}% For correct horizontal spacing within display math \[ ... \]
  \underbrace{
    \bordermatrix{\hspace{-\arraycolsep} & 
        \overbrace{\hphantom{\dfrac{1-s_R}{\delta}}}^{x} & 
        \overbrace{\hphantom{- \dfrac{\frac{\lambda-1}{\lambda}}{\rho + \frac{n}{\eta} - n}}}^{c} \cr
      \hspace{-\arraycolsep}\mathllap{(17') \left\{\vphantom{\dfrac{n}{\eta \cdot \delta}}\right.\kern-\nulldelimiterspace} & 
        \dfrac{n}{\eta \cdot \delta} & \dfrac{1}{\lambda}   \cr
      \hspace{-\arraycolsep}\mathllap{(16') \left\{\vphantom{- \dfrac{\frac{\lambda-1}{\lambda}}{\rho + \frac{n}{\eta} - n}}\right.\kern-\nulldelimiterspace} & 
        \dfrac{1-s_R}{\delta} & - \dfrac{\frac{\lambda-1}{\lambda}}{\rho + \frac{n}{\eta} - n}
    }
  }_{\text{coefficient matrix $\Delta$}}
  \cdot
  \begin{pmatrix}
    \widetilde{x} \\
    \widetilde{c}
  \end{pmatrix} =
  \begin{pmatrix}
    1 \\ 0
  \end{pmatrix}
\]
4
  • Wow ok, this looks good for the colomns. It will take me some time to bring those phantom-braces to the rows :)
    – Mac
    Mar 8, 2016 at 21:14
  • @Mac: See my updated answer...
    – Werner
    Mar 8, 2016 at 21:21
  • Wow perfect, this even troubles me with more headache :) If I copy your code the lower big brace doesn't fit yet, and I need some time to figure out the problem. But the left and upper braces are perfect.
    – Mac
    Mar 8, 2016 at 21:29
  • Sorry my mistake, my current .tex file missed the mathtools packages. Now everything is fine and the learning process will begin :) thx
    – Mac
    Mar 8, 2016 at 21:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.