# $f^2(x)$ vs $f(x)^2$ vs $f(x^2)$

How does the location of a power in a function adjust its result?

For example if $f(x) = 2x$

I assume that $f(x^2)$ would equal $2x^2$.

What I am unsure about is if $f^2(x)$ means $f(x)\times f(x)$ or $f(f(x))$. So would the final answer be $(2x)(2x)=4x^2$ or $2(2x)=4x$.

And is $f(x)^2$ the same as $f^2(x)$?

• generally its the latter one Feb 24, 2018 at 18:05
• I'd say that $f^2(x)$ was highly ambiguous and I would expect context to clarify. I agree that $f\circ f$ would be the more common meaning, but I think it should be spelled out.
– lulu
Feb 24, 2018 at 18:05
• You may find the answers here interesting math.stackexchange.com/a/2663269/504810 Feb 24, 2018 at 18:08
• Indeed there is an ambiguity. To avoid such confusion some uses the notation $f^{\circ n}$ to denote the $n$-fold iterated function. Feb 24, 2018 at 18:12
• When $f(x)^2$ is used, you can safely assume that it means $(f(x))^2$. $f(x^2)$ is always written as $f(x^2)$.
– user228113
Feb 24, 2018 at 18:19

You are right about $f(x^2)$; and $f(x)^2$ simply means $f(x)f(x)$. The troublesome notation is $f^2$, whether used to talk about the function $f^2$ or its value at the point $x$, namely $f^2(x)$. One convention often used is that it is the function whose values are the squared values of $f$, namely $f^2:x\mapsto f(x)^2$. However, in the sort of mathematics where we are more interested in compounding functions than in doing algebraic operations on their values, concatenation is a convenient way to represent composition, particularly because such composition is associative. Thus, $fgh$ means $x\mapsto f(g(h(x)))$. Using a more explicit expression of composition, we might write this associativity as $(f\circ g)\circ h=f\circ(g\circ h)$, but writing all those little circles is rather tedious when we are not doing algebra with the values and don't need to distinguish it from composition.
• I think in abstract algebra it is pretty common for $f^2$ to indicate $f\circ f$ as well, as it is in line with how we denote other binary operations applied multiple times and also extends to negatives to denote the inverse functions Apr 3, 2018 at 10:22
• The moral is: if you use notation $f^2(x)$, then define what you mean. In every new document, define it again. If that is too inconvenient for you, then use $f(x)^2$ or $f^{\circ 2}(x)$, or ... Exception: trig functions, but even though $\sin^2 x$ and $\sin^{-1} x$ have known meanings, still students are confused by them all the time. Apr 3, 2018 at 13:16