# Unable to include equation featuring special symbols

I am designing an article, and using the amsmath package.

I tried to use the following to include an equation in my document:

$$|\psi\rangle = \alpha|0\rangle + \beta|1\rangle \begin{pmatrix} \alpha & \beta \end{pmatrix} ^T$$


I get an error as:

ERROR: Missing $inserted. --- TeX said --- <inserted text>$
l.51

--- HELP ---
TeX probably found a command that can be used only in math mode when
it wasn't in math mode.  Remember that unless stated otherwise, all
all the commands of Section 3.3 in LaTeX Book (Lamport) can be used
only in math mode. TeX is not in math mode when it begins processing
the argument of a box-making command, even if that command is inside a
math environment. This error also occurs if TeX encounters a blank
line when it is in math mode.


Any idea where I'm going wrong here? Thanks.

EDIT: Took off the $'s. NOTE: I am using the T1 font encoding to be able to use the pipe symbol like that. -  The environment equation open the mathmode. You don't need any $. I very good composition ist the mathmode (author: Herbert Voß). mirror.ctan.org/info/math/voss/mathmode/Mathmode.pdf – Marco Daniel Jun 10 '11 at 13:25 I included the \$'s in a last-minute 'try-everything' kind of approach. I forgot to take them out before posting here. – Aarohi Johal Jun 10 '11 at 13:26

The dollar sign switches to (inline) math mode. As you already is in a math environment (equation), they are unnecessary. Also, you cannot have empty lines in the equation environment. This works:

$$|\psi\rangle = \alpha|0\rangle + \beta|1\rangle \begin{pmatrix} \alpha & \beta \end{pmatrix} ^T$$

-
 That was it! Thanks! – Aarohi Johal Jun 10 '11 at 13:30

\documentclass{article}
$$|\psi\rangle = \alpha|0\rangle + \beta|1\rangle \begin{pmatrix} \alpha & \beta \end{pmatrix} ^T$$