I wonder how I can align undersets below equations of matrix. I tried underset and stack under for the scripts, and tried vphantom for aligning. Your help will be much appreciated!
My code is:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{bm}
\usepackage{mathtools}
\begin{document}
\begin{equation}
\begin{equation}
\underset{\pmb{y}\in \mathbb{R}^m}{\begin{bmatrix}
18\\5\\15\\-9\\-3\\
\end{bmatrix}}=
\underset{\pmb{A}\in \mathbb{R}^m\times n}{\begin{bmatrix}
4 & 0 & 0 & -2 & 0 & 0 \\
0 & 0 & -1 & 0 & 3 & 0\\
0 & 5 & 0 & 0 & 0 & 0 \\
1 & 0 & 0 & -1 & 0 & -4 \\
1 & 0 & 0 & 0 & -5 & 0
\end{bmatrix}}
\underset{\pmb{x}\in \mathbb{R}^n}{\begin{bmatrix}
2\\ 3\\ -2\\ -5\\ 1\\ 4
\end{bmatrix}}
\end{equation}
\end{document}
\documentclass
and ending with\end{document}
.