# MathJax: How do I write matrices on the same line?

In answering this question, I needed to multiply three matrices - which obviously involves writing them on the same line. I tried a couple of things, none of which worked, so my question is - how do you write collinear matrices?

• – Qmechanic Jan 25 '15 at 21:45

It works the same way you did it earlier in the answer, when you had a matrix and vector: just write the markup for the matrices one after another.

$$\begin{pmatrix}...\end{pmatrix}\begin{pmatrix}...\end{pmatrix}\begin{pmatrix}...\end{pmatrix}$$


They don't all have to be on the same line, but as with any other MathJax expression, you can't have a blank line between the starting and ending s.

I went ahead and fixed the markup in the answer for you, as an example.