1

This is the state of affairs:

state of affairs

The goal is to horizontally center the symbols over their expressions within an equation environment. So A is centered over the first matrix, x centered over the first vector and b centered over the final vector.

MWE:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

  \begin{equation}
    \begin{split}
      %
      {\bf{A}} x & = b \\
      %
       \left[
       \begin{array}{cc}
          1 & 0 \\ 0 & 1 \\
       \end{array}
       \right]
       %
       \left[
         \begin{array}{c}
            x_1 \\ x_2
         \end{array}
       \right] &=
       %
       \left[
         \begin{array}{c}
            b_1 \\ b_2
         \end{array}
       \right]
       %
    \end{split}
  \end{equation}

\end{document}

These posts do not seem to offer readily a solution:

Complicated alignment within multiline equation

Aligning Multiline Matrix Equations

Aligning equations with text with alignat

Difference between align and alignat environments

TeXShop 3.58, distribution TeXLive - 2015

2

With array you can obtain the following:

enter image description here

\documentclass{article}
\usepackage{amsmath}

    \begin{document}
\begin{equation}\arraycolsep=1pt
    \begin{array}{cccc}
\mathbf{A}      &  \mathbf{x}       & = &   \mathbf{b}  \\
\begin{bmatrix}
1 & 0 \\ 0 & 1 \\
\end{bmatrix}   &   \begin{bmatrix}
                    x_1 \\ x_2
                    \end{bmatrix}   & = &   \begin{bmatrix}
                                            b_1 \\ b_2
                                            \end{bmatrix}
    \end{array}
\end{equation}
    \end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.