Why blank lines between equation makes error? there are a lot of commands in latex and almost for all of them these blank lines are not important, but why in this case is important and is there any similar function?
An excerpt from page 135 of the TeXbook:
... [A] blank line or
\paris not permitted in math mode. This gives TeX another way to recover from a missing
$; such errors will be confined to the paragraph in which they occur.
Knuth provides the following example to motivate this syntax rule:
For example, suppose you were to write
The smallest $n such that $2^n>1000$ is~10.
TeX doesn't know that you forgot a
$after the first
n, because it doesn't understand English; so it finds a "formula" between the first two
$signs: after which it thinks that
2is part of the text. But then the
^reveals an inconsistency; TeX will automatically insert a
^, and you will get an error message. In this way the computer has gotten back into synch, and the rest of the document can be typeset as if nothing had happened.
So, while it may seem like a nuisance at first not be be allowed to have blank lines in (inline or display) math mode, there's actually a very good reason for this syntax rule: It helps confine the error to the paragraph in which it occurs and lets you compile the rest of the document (assuming you want to do so).
Of course, if we could absolutely guarantee that we'd never ever have any missing
$ symbols in our inputs, the prohibition against blank lines wouldn't be needed to begin with. However, which of us is fully able and willing to provide such a guarantee?