# 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

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}