2009-12-26 20 views
3

即時得到兩個矩陣試圖讓這些出現在同一行沒有任何成功,我的編碼是在一行

\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} 

任何提示或建議,將受到歡迎

+0

NB。 pavium的重新格式改變了cal的問題的語義 – 2009-12-26 15:51:38

回答

6

擺脫所有\[\],並在它們之間添加一些空間:

\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} 
4

隨着AMS-LaTeX包,你可以用個更方便地完成這個任務e alignpmatrix環境:

\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}