I want to create a simple matrix and the code is given below, but I got error when I compile it. Could anyone help with this?

$$e^{-{\cal L}= \left[ \begin{array}{cccccc} 1 & 0 & . & . & . & 0 \\ 0 & 0 & . & . & . & 0 \\ 0 & 0 & . & . & . & 0 \\ 0 & 0 & . & . & . & 0 \\ 0 & 0 & . & . & . & 0 \\ 0 & 0 & . & . & . & 0 \\ \end{array} \right]$$

• you are missing a right brace in e^{-{\cal L} Nov 17, 2013 at 1:16
• If you use a bmatrix you won't have to specify the delimiters and the centering. And you can use \cdots instead of multiple columns. Also see tex.stackexchange.com/questions/503/why-is-preferable-to Nov 17, 2013 at 1:26
• The problem with forgetting braces would be easier to solve if \mathcal{L} is used instead of {\cal L} which has been obsolete for twenty years. Nov 17, 2013 at 10:02
• Your equation is mathematically impossible because this matrix has determinant zero, and e^{-L} has matrix inverse e^{+L} (or \det e^{-L}=\exp(-trace of L)\neq 0).
– user4686
Nov 17, 2013 at 21:41

Or you might need something like below.

\documentclass[preview,border=12pt,varwidth]{standalone}% change it back to your own document class
\usepackage{amsmath}

\begin{document}
\abovedisplayskip=0pt\relax% don't use this line in  your production
$e^{-\mathcal{L} } = \begin{bmatrix} 1 & 0 & \cdots & 0 \\ 0 & 0 & \cdots & 0 \\[-1ex] \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & 0 \end{bmatrix}$
\end{document}


• Can you please change it into e^{-\mathcal{L}}? Nov 17, 2013 at 10:02
• you might also want to insert a small negative vertical space just before the line with all the dots so that the gaps are symmetcical. \\[-.5ex] might do it. don't leave a space after the \\  -- amsmath cleverly notices a space there and assumes the bracket does not mean a spacing adjustment. Nov 17, 2013 at 14:20
• @barbarabeeton: \\[-1ex] rather than \\[-.5ex] will do better but it is still not the exactest value I think. Nov 17, 2013 at 16:54
• I wonder if the OP in fact wanted 1's on the diagonal, because as it stands this matrix equation has no solution in L.
– user4686
Nov 17, 2013 at 21:42