Writing Matrices on One Row & Labeling - LaTeX

Click For Summary

Discussion Overview

The discussion revolves around formatting matrices in LaTeX, specifically how to display multiple matrices in a single line, label them for future reference, and ensure they are numbered like equations. The scope includes technical aspects of LaTeX formatting and labeling conventions.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Homework-related

Main Points Raised

  • Participants inquire about displaying multiple matrices in a single line and how to format the multiplication of these matrices.
  • Some participants suggest using \label{} to label matrices for later reference, while others clarify the need for overall equation labeling.
  • There is a discussion about using \underbrace to label matrices A, B, and C, but uncertainty exists about how to refer to all matrices simultaneously.
  • One participant expresses confusion about where to place the \label{} command in their code to ensure it works correctly.
  • Another participant suggests using the equation environment to automatically number the matrices as equations, indicating that the displaymath environment does not provide numbering.

Areas of Agreement / Disagreement

Participants generally agree on the need for labeling matrices and the use of the equation environment for numbering. However, there is some uncertainty regarding the specific implementation of these concepts, particularly with the use of \underbrace and the placement of \label{}.

Contextual Notes

Limitations include the lack of clarity on how to use \underbrace effectively and the specific formatting requirements for labeling matrices within LaTeX.

Who May Find This Useful

Individuals working with LaTeX who need to format and label matrices, particularly in academic or technical documents.

ladil123
Messages
42
Reaction score
0
Hello!

I know how to do a matrice in latex like this:
\[
\begin{bmatrix}
a & b & c \\
d & e & f \\
g & h & i
\end{bmatrix}
\]

How do I write severell matrices on one row like : "matrix_A times another matrix_B = answer "

And how can I label the matrices so I can refer to them later on ?
Thanks
 
Physics news on Phys.org
ladil123 said:
Hello!

I know how to do a matrice in latex like this:
\[
\begin{bmatrix}
a & b & c \\
d & e & f \\
g & h & i
\end{bmatrix}
\]

How do I write severell matrices on one row like : "matrix_A times another matrix_B = answer "

And how can I label the matrices so I can refer to them later on ?
Thanks
Like this,

Code:
\[
 \begin{bmatrix}
  a & b & c \\
  d & e & f \\
  g & h & i
 \end{bmatrix}
 \begin{bmatrix}
  a & b & c \\
  d & e & f \\
  g & h & i
 \end{bmatrix}
=
 \begin{bmatrix}
  a & b & c \\
  d & e & f \\
  g & h & i
 \end{bmatrix}
\]

With respect to the labelling, do you mean label them by given them a tex label such as \label{matrix1} or simply calling them matrix "A"?
 
Yes I mean such as \label{matrix1}

Thanks you!
 
ladil123 said:
Yes I mean such as \label{matrix1}

Thanks you!
As far as I'm aware, there are no macros available for numbering terms within a single equation.

The best you could do would be to label the matrices A,B,C using something like \underbrace and then give the equation a label using \label{matrices}. You could then reference the matrices using something of the form:
"see matrix A in \eqref{matrices}"​
 
If I have the three matrices that you wrote, then I want to refer to all three at the same time, not only the first matrix or the second.
I don´t know how to use \underbrace..
 
ladil123 said:
If I have the three matrices that you wrote, then I want to refer to all three at the same time, not only the first matrix or the second.
That's fine then. Simply give the over all equation a label using \label{matrices} and then you can refer to the equation using \eqref{matrices}.

Does that answer your question?
 
Yes, kind of.
I have written \label{matrix1} after \end{bmatrix} but it doesn't work, where should I write \label{matrix1} in my code ?
 
ladil123 said:
Yes, kind of.
I have written \label{matrix1} after \end{bmatrix} but it doesn't work, where should I write \label{matrix1} in my code ?

Instead of using the \[ delimiters, which correspond to the displaymath environment, you need to use the equation environment:

Code:
\begin{equation}
equation goes here
\label{equation name goes here}
\end{equation}

This will then give your equation a number, which can be referred to using the \eqref{equation name goes here} command.
 
Thank you very much!
 
  • #10
Hello!
I have matrices in my LaTex document. LaTex automatically gives order number to all equations, but it doesn’t numerate matrices. Could you help me and say how I could automatically numerate matrices as equations. Beforehand thank you.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 11 ·
Replies
11
Views
6K
Replies
3
Views
8K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 17 ·
Replies
17
Views
7K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K