how to write inline matrix in Latex

\begin{pmatrix} 2 \\ 4 \\ -2 \end{pmatrix} 

This is 3*1 vector matrix and i want to write another matrix or x and y s beside that one. Is there any method to write matrix inline ?

1

2 Answers

Are you using in-line delimiters around the math? E.g.,

$\begin{pmatrix} 2 \\ 4 \\ -2 \end{pmatrix}$ 

If you put another matrix inside these delimiters, they will be put in-line next to it. For instance, see this live example:

<script> MathJax = { tex: {inlineMath: [['$','$']]} } </script> <script src=""></script> This math is in line, $ \begin{pmatrix} a & b & c \\ d & e & f \\ g & h & i \end{pmatrix} \begin{pmatrix} 2\\ 4\\ -2 \end{pmatrix} $, with text following it.

Simply put your code inside two dollar signs ($) and it's done.

$ \begin{pmatrix} 2 \\ 4 \\ -2 \end{pmatrix} $ 

Note that if you put double dollar signs ($$) it will write the matrix in a new line and then continues the rest of the sentence in the line after that.

$$ \begin{pmatrix} 2 \\ 4 \\ -2 \end{pmatrix} $$ 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like