I was trying to left align this equation by using code
$$\begin{equation}
\begin{aligned}
E_\theta(L(\delta_1(X)) &=& E_\theta[(1-\frac{b}{a+X^2}) X-\theta]^2\nonnumber\\
&=&E_\theta[Y-\frac{b}{a+(Y+\theta)^2}(Y+\theta)]^2\nonnumber\\
&=& n-2bE\frac{Y(Y+\theta)}{a+(Y+\theta)^2}+b^2E\frac{(Y+\theta)^2}{[a+(Y+\theta)^2]^2}\nonnumber\\
&<&n-2bE\frac{Y(Y+\theta)^2-b/2}{a+(Y+\theta)^2} \label{eq:21}\end{aligned}\end{equation}$$
However, it turns out it's still right aligned and it is labelled (1) instead of (2.1)
My preamble is
\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[fleqn]{amsmath}

$$, see Why is\[…\]preferable to$$? – Werner Jul 26 '13 at 16:52eqnarraynotation for alignment. Use only one ampersand&to the left of the binary operator/relation to mark the appropriate alignment. – Werner Jul 26 '13 at 16:54&=&by&=... – Werner Jul 26 '13 at 16:582in(2.1)represent? The section? If so, perhaps adding\renewcommand{\theequation}{\thesection.\arabic{equation}}to your document preamble might help. – Werner Jul 26 '13 at 16:59