Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
Errors in matrix equation?

I'm trying to use official equation container for the first time, and it's giving me some trouble. I have this equation of a simple matrix operation, and LaTeX isn't liking it. What's wrong with this statement?

\begin{equation}

    y = \begin{bmatrix}
        T & I
     \end{bmatrix}
    \begin{bmatrix}
        a \\
        e
    \end{bmatrix}

\end{equation}
share|improve this question

marked as duplicate by Werner, lockstep, percusse, Marco Daniel, Tom Bombadil Aug 24 '12 at 2:37

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Possible duplicate of Errors in matrix equation? –  Werner Jul 31 '12 at 1:31

1 Answer 1

up vote 6 down vote accepted

You can't leave blank lines inside environments for displayed math equations:

\begin{equation}
    y = \begin{bmatrix}
        T & I
     \end{bmatrix}
    \begin{bmatrix}
        a \\
        e
    \end{bmatrix}
\end{equation}

If you want to make your code more readable, then comment out the blank lines:

\begin{equation}
%
    y = \begin{bmatrix}
        T & I
     \end{bmatrix}
    \begin{bmatrix}
        a \\
        e
    \end{bmatrix}
%
\end{equation}

And, of course, you need to load the amsmath package in the preamble to use bmatrix:

 \usepackage{amsmath}
share|improve this answer
    
I knew that, rookie mistake! Thanks –  orange Jul 31 '12 at 0:43

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