# Problem putting matrix operations in an equation [duplicate]

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?

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

-

## marked as duplicate by Werner, lockstep, percusse, Marco Daniel, Tom BombadilAug 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

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

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


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

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


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

 \usepackage{amsmath}

-
I knew that, rookie mistake! Thanks –  orange Jul 31 '12 at 0:43