Possible Duplicate:
Linebreak in equations
I am very new to latex, its been a super frustrating I spend almost close to two hours on getting a new line inside the math block
\[{P(g(X) \neq Y |X = x) = 1 − P (Y = g(X)|X = x)}
{= 1 - [P(Y=1,g(X)=1|X=x) + P(Y=1,g(X)=1|X=x)]}
{= 1 − E[1_{Y =1} 1_{g(X)=1}|X = x] + E[1_{Y =0} 1{g(X)=0}|X = x]}
\]
Also I used underscores to show the subscript but somehow that doesn't work either.
It would be great if someone could give a pointer.