\documentclass{article}

\begin{document}

Matching brackets on a line do nothing (like this).

Matching brackets on two lines also do nothing (like this
longer example).

Matching brackets on three lines get an indent (like this
  much much longer example
right here on these lines).

Matching brackets on more lines also get an indent (like this
  much much
  much much
  much longer example
here).

The brackets could start at the beginning of the line
(so maybe
  they look
like this).

[They could
  be any shape
of bracket]

{Even braces get
  the same
indents too}

What about equations? They are the same:
$(1 + 2 + 3)$

$(1 + 2
  + 3 + 4
  + 5 + 7
+ 8 + 9)$

And the dollars can go anywhere as expected:

$
(1 + 2
  + 3 + 4
  + 5 + 7
+ 8 + 9)
$

Note that dollars themselves are not indented

\end{document}
