# Can you put two matrices in display mode side by side in LyX?

I have two matrices, and I want to render them side by side with appropriate space in between in display mode. How should it be implemented in LyX?

-
Just insert a matrix, add a spacing, and insert another matrix. –  C.R. Jul 19 '11 at 2:49

No idea how things are in LyX, but here's one way to do it using LaTeX:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

$A= \begin{bmatrix} 0 & 1 & 1 \\ 1 & 0 & 1 \end{bmatrix}\quad B= \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \end{bmatrix}$

\end{document}


-

Displaying two matrices side-by-side in LaTeX should be (is!) independent of the editor (LyX). Here's a minimal example showing how to place 2 matrices next to one another:

\documentclass{article}
\begin{document}
This is text.
$\left[\begin{array}{cc} a & b \\ c & d \end{array}\right] \qquad \left[\begin{array}{cc} e & f \\ g & h \end{array}\right]$
This is some more text.
\end{document}​​​​​​​​


The space between the two matrices is specified using \qquad (two \quads). However, you can change this. For example, you may want \hspace{5em} or \qquad \qquad (4 \quads) or whatever.

-