im trying to get these to appear in the same line without any success, my coding is
\begin{equation}
P^+=\[ \left( \begin{array}{ccc}
1 & 0\\
0 & 0\end{array} \right)\]
P^-=\[ \left( \begin{array}{ccc}
0 & 0\\
0 & 1\end{array} \right)\]
\end{equation}
any hints or suggestions would be welcome
Get rid of all the \[
and \]
, and add some space between them:
\begin{equation}
P^+= \left( \begin{array}{ccc}
1 & 0\\
0 & 0\end{array} \right)\qquad
P^-= \left( \begin{array}{ccc}
0 & 0\\
0 & 1\end{array} \right)
\end{equation}
With the AMS-LaTeX package, you can accomplish this task more conveniently with the align
and pmatrix
environments:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
P^+ &= \begin{pmatrix}
1 & 0 \\
0 & 0
\end{pmatrix}
&
P^- &= \begin{pmatrix}
0 & 0 \\
0 & 1
\end{pmatrix}
\end{align}
\end{document}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With