1

I want the code below to appear in one line but the last array (the transposed one) appears on the line below. What should I do?

\begin{equation}

 X'X=(V_r,V_{p-r}) \[ \left( \begin{array}{cc}
 \Lambda_r & 0 \\
 0 & \Lambda_{p-r} \end{array} \right)\] \[ \left( \begin{array}{c}
 V'_r\\
 V'_{p-r} \end{array} \right)\]

 \end{equation}
jub0bs
  • 58,916
Bazman
  • 857

1 Answers1

2

\[...\] initiates a display math environment, which you don't need inside the equation environment, since you're already inside math mode.

enter image description here

\documentclass{article}
\begin{document}
\begin{equation}
  X'X = (V_r, V_{p-r}) \left( \begin{array}{cc}
    \Lambda_r & 0 \\
    0 & \Lambda_{p-r}
  \end{array} \right) \left( \begin{array}{c}
    V'_r \\
    V'_{p-r}
  \end{array} \right)
\end{equation}
\end{document}

Also see Where is the \matrix command? for more ways of typesetting matrices.


Here is a minor adjustment that uses the \biggl/\biggr pair rather than \left/\right, and also reduces the outer column specification:

enter image description here

\documentclass{article}
\begin{document}
\begin{equation}
  X'X = (V_r, V_{p-r}) \biggl( \begin{array}{@{}cc@{}}
    \Lambda_r & 0 \\
    0 & \Lambda_{p-r}
  \end{array} \biggr) \biggl( \begin{array}{@{}c@{}}
    V'_r \\
    V'_{p-r}
  \end{array} \biggr)
\end{equation}
\end{document}
Werner
  • 603,163