Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is it possible to give an equation number to each row of a matrix equation?

enter image description here

How could I have equation labels in the vein of subequation numbers, one for each row of the matrix equation? Here, I'd like equation numbers such as, e.g., (3.1a), (3.1b), (3.1c) (I don't mean row/column labels as in a bordered matrix).

Thanks!

share|improve this question
    
Use an image we don't use mathjax on this site as it would confuse the issue as people need to show the tex rendering amd mathjax does not use tex –  David Carlisle May 9 at 23:36
1  
Related, but not automatic numbering: Label rows of a matrix by characters –  Mike Renfro May 9 at 23:39
    
Thanks. I placed an image. –  Dominique May 9 at 23:42
1  
I can't understand what the line number would refer to. –  egreg May 10 at 7:44
    
@egreg each line number would refer to a block equation of the system. –  Dominique May 10 at 19:44

1 Answer 1

up vote 12 down vote accepted

Hmm! not really supported LaTeX syntax but

output

\documentclass{article}

\usepackage{amsmath}

\newsavebox\labelbox

\begin{document}

\savebox\labelbox{$\begin{matrix}
\refstepcounter{equation}(\theequation)\label{aa}\\
\refstepcounter{equation}(\theequation)\label{bb}\\
\refstepcounter{equation}(\theequation)\label{cc}
\end{matrix}$}

\[
  \begin{bmatrix}
    H            & J^T       & -Z^{\frac12} \\
    J            & -\delta I &              \\
    -Z^{\frac12} &           & -X
  \end{bmatrix}
  \begin{bmatrix}
    r \\ s \\ t
  \end{bmatrix}
  =
  \lambda
  \begin{bmatrix}
    H &   &  \\
      & U &  \\
      &   & W
  \end{bmatrix}
  \begin{bmatrix}
    r \\ s \\ t
  \end{bmatrix}
\eqno
\usebox{\labelbox}
\]

[\ref{aa}]
[\ref{bb}]
[\ref{cc}]
\end{document}
share|improve this answer
    
Very interesting (and potentially useful) technique. Is there anything that can go wrong with it? –  Steven B. Segletes May 10 at 2:01
    
I didn't think of that. I like it! Why do you say it's not supported?It's not inelegant. –  Dominique May 10 at 4:30
    
\eqno is a TeX primitive and wouldn't generally work in conjunction with amsmath constructs, but you get away with it here. Probably you could (and should) use \tag in other contexts. –  David Carlisle May 10 at 10:04
    
@StevenB.Segletes something can go wrong with anything:-) \eqno shouldn't be used in latex (and wouldn't work in most ams math constructs) but it works here and I was getting tired:-) –  David Carlisle May 10 at 10:06
    
But you know me. I'm not contemplating using in with ams math constructs, but rather with TABstacks ;^) –  Steven B. Segletes May 10 at 11:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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