54

I need to typeset a matrix with square brackets as delimiters for math.se (I believe they use MathJaX). How would I do that?

Bob
  • 541

3 Answers3

54

MathJax seems to accept the standard amsmath syntax

$\begin{bmatrix}a & b\\c & d\end{bmatrix}$

Rows are terminated with \\ and columns are separated by &

egreg
  • 1,121,712
15

The curved brace matrix in Mathjax is:

$$\begin{pmatrix}a & b\\\ c & d\end{pmatrix}$$

enter image description here


Note: I used the wrapper \color{#C00}{ <code goes here> } to format it in this dark red color :)

Conor
  • 349
  • 2
  • 7
10

MathJax comes with a configuration file that includes all the most general of the pre-defined configurations. It loads all the important MathJax components, including the TeX and MathML preprocessors and input processors, the AMSmath, AMSsymbols etc. So what you do you write in a similar fashion to a normal TeX file.

  $\begin{matrix} a & b \\ c & d \end{matrix}$

Whenever you get stuck do a search on wikipedia and view the equation in the editor tab. Most of the wiki mark-up will work straight with MathJax.

yannisl
  • 117,160