Writing a formula below a matrix

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}

-
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

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

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

-
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
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
@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

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}


-
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

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.

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}

\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}


-