[Tex/LaTex] How to have matrices side by side in latex

matrices

I'm new to latex and all of my matrices seem to be created on new lines, I can't seem to put them side by side. Here is what I am doing to make a matrix (with the 2d identity matrix as an example):

\[ \left( \begin{array}{cc}
1 & 0 \\
0 & 1
\end{array} \right) \]

Am I making it wrong? How can I place a second matrix directly beside this, as you would when doing matrix mathematics? Thanks

Best Answer

Don't enclose each array with \[ ... \]; instead, put all the arrays that you want together within one set of delimeters. Like this:

\[ \left( \begin{array}{cc}
1 & 0 \\
0 & 1
\end{array} \right)
%
\left( \begin{array}{cc}
1 & 0 \\
0 & 1
\end{array} \right)
\]

You should read the mathmode documentation. It should be part of your TeX Distribution, and has lots of examples to follow.

Related Question