TITLE: Is the supremum of a function squared the square of its supremum
QUESTION [6 upvotes]: Let $f$  be a holomorphic function on the open unit disc.
Is $(\sup \vert f \vert)^2 = \sup (\vert f\vert^2)$?

REPLY [9 votes]: I don't think this has anything to do with $f$ being a holomorphic function on the open unit disk. The square of the supremum of any set of non-negative numbers is the supremum of the squares.

REPLY [5 votes]: For weakly positive real numbers, the inequalities $x \le y$ and $x^2 \le y^2$ are equivalent. Since the modulus of the function is always weakly positive, this is all you need.