TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
$\begin{bmatrix}a\\b\end{bmatrix}$ works – egreg Feb 4 '12 at 23:22
@egreg How would I put multiple values in the same row? – Bob Feb 4 '12 at 23:28
$\begin{bmatrix}a & b\\c & d\end{bmatrix}$, just like LaTeX with amsmath – egreg Feb 4 '12 at 23:44
You can also find a suitable example and see its source code by clicking edit. Here is an old example that I found at a quick glance to my answers while I was active in there and has many matrices in it. – percusse Feb 5 '12 at 2:09
You can also right click on an equation, Show Math As → TeX commands. – kennytm Feb 5 '12 at 7:57

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 &

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.