[Tex/LaTex] Writing a formula below a matrix

matrices

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}

Best Answer

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

Related Question