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.

I have a matrix environment:

\begin{bmatrix}

 ...

\end{bmatrix}

How can I write below that matrix? I tried with substack, so I wrote \end{bmatrix}_{\substack{...}}

That doesn't work as it does with, for example, a sum. How can I write a formula exactly below the matrix?

EDIT: Okay, I found out how to do it myself now by using the array environment

\documentclass[a4paper,12pt, oneside]{article}
\usepackage{amsmath,amsfonts,amssymb,amsopn,amscd}

\begin{document}

\begin{equation*}
\begin{array}{c}
A : =
\begin{bmatrix}
x \\
y \\
z \\
a
\end{bmatrix} \\
x=0
\end{array}
\end{equation*}

\end{document}
share|improve this question
2  
Welcome to LaTeX! Welcome to TeX.sx! Please add a minimal working example (MWE) that starts from \documentclass{...} and ends with \end{document} and illustrates your problem. –  percusse Oct 7 '12 at 21:56
    
This surely works: \begin{matrix}\begin{bmatrix}<matrix>\end{bmatrix}\\<formula>\end{matrix} but some of the context in which you want this would help. –  egreg Oct 7 '12 at 21:59
add comment

3 Answers

We can use \underset

\documentclass[a4paper,12pt, oneside]{article}

\usepackage{amsmath,amsfonts,amssymb,amsopn,amscd}

\begin{document}

$A:=\underset{
\begin{array}{c}
x=0
\end{array}
}{
\begin{bmatrix}
x \\ 
y \\ 
z \\ 
a
\end{bmatrix}
}$



\end{document}

to create

enter image description here

ADDED. Comparison between the above code and as commented by egreg:

\documentclass[a4paper,12pt, oneside]{article}
\usepackage{amsmath,amsfonts,amssymb,amsopn,amscd}
\begin{document}
Original

$A:=\underset{
\begin{array}{c}
x=0
\end{array}
}{
\begin{bmatrix}
x \\ 
y \\ 
z \\ 
a
\end{bmatrix}
}$

As per egreg's comment

$A:=\underset{
\begin{array}{@{}c@{}}
x=0
\end{array}
}{
\begin{bmatrix}
x \\ 
y \\ 
z \\ 
a
\end{bmatrix}
}$
\end{document}

Output

enter image description here

share|improve this answer
1  
The array may be useful if there are more then one conditions. However I'd use \begin{array}{@{}c@{}} to remove the extra space at both sides. –  egreg Oct 8 '12 at 17:17
    
@egreg Thanks! I added your advice. –  Américo Tavares Oct 8 '12 at 17:37
    
I would maybe consider \mathclap{x=0} since its far away from the rest of the equation so it doesn't need to occupy any horizontal space –  tohecz Oct 8 '12 at 17:51
    
@tohecz I wouldn't use such a build up anyway, since probably a subscript to the main matrix would be less ambiguous. Whether using \mathclap depends mostly on what similar conditions are used throughout the document. –  egreg Oct 8 '12 at 17:56
1  
@AméricoTavares Sorry, it needs \usepackage{mathtools}, and then you put \mathclap{x=0} instead of simple x=0, it makes x=0 occupy no horizontal space, which seems to be good here. –  tohecz Oct 8 '12 at 18:17
show 2 more comments

An equation below the matrix in normal size looks a little odd, if the equation is just an annotation/index to the matrix. The following uses the same method as putting equations below \sum, \prod and other operators:

\documentclass[a4paper,12pt, oneside]{article}
\usepackage{amsmath,amsfonts,amssymb,amsopn,amscd}
\usepackage{colonequals}

\begin{document}

\begin{equation*}
A \colonequals
\mathop{
  \begin{bmatrix}
  x \\
  y \\
  z \\
  a
  \end{bmatrix}
}\limits_{x=0}
\end{equation*}

\end{document}

Result

share|improve this answer
    
This is what I would consider the good approach, it was exactly my thought when I read the question! –  tohecz Oct 8 '12 at 17:52
add comment

Since you are already using amsmath, it's better to use its environments:

\begin{equation*}
\begin{matrix}
A : =
\begin{bmatrix}
x \\
y \\
z \\
a
\end{bmatrix} \\
x=0
\end{matrix}
\end{equation*}

In this case the difference is not evident, but array adds spaces at both sides that matrix doesn't.

enter image description here

If you want that the condition is exactly below the matrix and not centered also with respect to A:=, then an array is the way to go, but in a more sophisticated fashion:

\documentclass{article}
\usepackage{mathtools} % load also amsmath

\begin{document}
\begin{equation*}
\begin{array}{@{}c@{}c@{}}
A : = {} &
\begin{bmatrix}
x \\
y \\
z \\
a
\end{bmatrix} \\
& \mathclap{x=0}
\end{array}
\end{equation*}
\end{document}

enter image description here

share|improve this answer
add comment

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.