mathjax – how to write inline matrix in Latex

mathjax – how to write inline matrix in Latex

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=https://cdn.jsdelivr.net/npm/[email protected]/es5/tex-chtml.js id=MathJax-script></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 its 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} $$

mathjax – how to write inline matrix in Latex

Leave a Reply

Your email address will not be published.