Math & ScienceArrange Matrices

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
S_David
Posts: 45
Joined: Tue Jul 07, 2009 4:16 am

Arrange Matrices

Post by S_David »

Hello,

In the following code, how can I arrange the matrices as two adjacent matrices and one below them in the middle?

Code: Select all

\documentclass[a4paper,12pt,openany,oneside]{memoir}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\begin{aligned}
\mathbf{H}_A&=
\begin{pmatrix}
h_A^{(1,1)}&h_A^{(1,2)} \dots &h_A^{(1,M_A)}\\
h_A^{(2,1)}&h_A^{(2,2)} \dots &h_A^{(2,M_A)}\\
\vdots & \vdots & \vdots\\
h_A^{(N_A,1)}&h_A^{(N_A,2)} \dots &h_A^{(N_A,M_A)}
\end{pmatrix} \\
\mathbf{H}_B&=
\begin{pmatrix}
h_B^{(1,1)}&h_B^{(1,2)} \dots &h_B^{(1,M_B)}\\
h_B^{(2,1)}&h_B^{(2,2)} \dots &h_B^{(2,M_B)}\\
\vdots & \vdots & \vdots\\
h_B^{(N_B,1)}&h_B^{(N_B,2)} \dots &h_B^{(N_B,M_B)}
\end{pmatrix}\\
\mathbf{H}_C&=
\begin{pmatrix}
h_C^{(1,1)}&h_C^{(1,2)} \dots &h_C^{(1,M_A)}\\
h_C^{(2,1)}&h_C^{(2,2)} \dots &h_C^{(2,M_A)}\\
\vdots & \vdots & \vdots\\
h_A^{(N_B,1)}&h_A^{(N_B,2)} \dots &h_C^{(N_B,M_A)}
\end{pmatrix}\\
\end{aligned}\label{ChannelMatrices}
\end{equation}
\end{document}
Thanks in advance

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

Arrange Matrices

Post by Stefan Kottwitz »

Hi,

just position the two matrices without the alignment, perhaps use gather:

Code: Select all

\begin{gather}
\mathbf{H}_A =
\begin{pmatrix}
h_A^{(1,1)}&h_A^{(1,2)} \dots &h_A^{(1,M_A)}\\
h_A^{(2,1)}&h_A^{(2,2)} \dots &h_A^{(2,M_A)}\\
\vdots & \vdots & \vdots\\
h_A^{(N_A,1)}&h_A^{(N_A,2)} \dots &h_A^{(N_A,M_A)}
\end{pmatrix} \quad
\mathbf{H}_B =
\begin{pmatrix}
h_B^{(1,1)}&h_B^{(1,2)} \dots &h_B^{(1,M_B)}\\
h_B^{(2,1)}&h_B^{(2,2)} \dots &h_B^{(2,M_B)}\\
\vdots & \vdots & \vdots\\
h_B^{(N_B,1)}&h_B^{(N_B,2)} \dots &h_B^{(N_B,M_B)}
\end{pmatrix}\notag\\
\mathbf{H}_C =
\begin{pmatrix}
h_C^{(1,1)}&h_C^{(1,2)} \dots &h_C^{(1,M_A)}\\
h_C^{(2,1)}&h_C^{(2,2)} \dots &h_C^{(2,M_A)}\\
\vdots & \vdots & \vdots\\
h_A^{(N_B,1)}&h_A^{(N_B,2)} \dots &h_C^{(N_B,M_A)}
\end{pmatrix}
\label{ChannelMatrices}
\end{gather}
Stefan
LaTeX.org admin
S_David
Posts: 45
Joined: Tue Jul 07, 2009 4:16 am

Re: Arrange Matrices

Post by S_David »

It works. Thank you
Post Reply