In the Wikipedia page on Interval Arithmetic, the example for the Dependency problem is that

$f(x) = x^2 + x$ on the interval $\left[-1, 1\right]$ is $\left[-1, 2\right]$.

I don't understand why this is the case. Looking at the calculations

$$\left[-1, 1\right]^2 = [0, 1]$$


If I just look at how multiplication is defined on the Wikipedia page: $$[x_1, x_2] \cdot [y_1, y_2] = [\min\{x_1 y_1, x_1 y_2, x_2 y_1, x_2, y_2\}, \max\{x_1 y_1, x_1 y_2, x_2 y_1, x_2, y_2\}]$$

Shouldn't we obtain

$$[-1, 1]^2 = [-1, 1] \cdot [-1, 1] = [\min\{1, -1, -1, 1\}, \max\{1, -1, -1, 1\}] = [-1, 1]$$

What did I do wrong?

  • $\begingroup$ Even for real numbers, $x^2 = x x$ is less a definition than a result from the definition $x^n \equiv \exp(n \ln x)$. $\endgroup$
    – chepner
    Jun 13, 2023 at 18:04

3 Answers 3


This is a subtle point about variable use. Basically, we're treating $-^2$ as a unary function: "$x^2$" is going to play differently with interval arithmetic than "$xx$."

Writing "$sq(-)$" to avoid conflation with Cartesian products, we have by definition $$sq([-1,1])=[\min\{a^2: a\in [-1, 1]\}, \max\{a^2: a\in [-1,1]\}]=[0,1].$$ Note that the numerical term occurring inside the $\min$/$\max$ operators (namely "$a^2$") has only one variable.

By contrast, as you correctly observe if we plug in the interval $[-1,1]$ for $x$ in the expression "$xx$" we get $[-1,1]$. This is because the term "$xx$" has two occurrences of the variable "$x$," so to calculate $[-1,1]\cdot [-1,1]$ we wind up looking at the expression $$[\min\{a\cdot b: a\in[-1,1], b\in [-1,1]\}, \max\{a\cdot b: a\in[-1,1], b\in [-1,1]\}].$$

It may help to go a bit more general. Any $n$-ary function $f:\mathbb{R}^n\rightarrow\mathbb{R}$ whatsoever has a "set-ified" analogue $\widehat{f}:\mathcal{P}(\mathbb{R})^n\rightarrow\mathcal{P}(\mathbb{R})$ defined by $$\widehat{f}(X_1,...,X_n)=\{f(a_1,...,a_n): a_1\in X_1,...,a_n\in X_n\}.$$ Certain "nice" choices of $f$ take intervals to intervals, but this is really just a particularly nice part of the overall "extended function landscape." Conversely, if we fix a particular kind of set in advance (such as "intervals" in this case), we get a corresponding notion of "shape-preserving function." This is a wild digression, but I think it helps some readers to situate interval arithmetic in a more abstract context.

  • $\begingroup$ Could you elaborate on $xx$ vs $x^2$? $\endgroup$ Jun 12, 2023 at 16:51
  • $\begingroup$ @Chickenmancer I've added a bit more, but I'm not sure specifically what you want elaborated. $\endgroup$ Jun 12, 2023 at 16:55
  • $\begingroup$ Thanks for the answer, that makes sense and it better captures the interval. $\endgroup$ Jun 12, 2023 at 16:57
  • 1
    $\begingroup$ I posted this as a seperate question: math.stackexchange.com/questions/4717550/… $\endgroup$ Jun 12, 2023 at 17:18
  • 3
    $\begingroup$ @Chickenmancer I think it makes more sense to think of it as $xy$ vs $xx$. If the ranges of $x$ and $y$ are both $[-1, 1]$, then the range of $xy$ is also $[-1, 1]$; but the range of $xx$ is $[0, 1]$. $\endgroup$
    – Stef
    Jun 13, 2023 at 9:37

Your work is fine, if you assume that $[a,b]^2 = [a,b] \cdot [a,b] = \{ xy : x,y \in [a,b] \}$.

However, a better definition is $[a,b]^2 = \{ x^2 : x \in [a,b] \}$ and that gives $[0,\max(a^2,b^2)]$ when $0 \in [a,b]$.

  • $\begingroup$ I wouldn’t exactly call this a “better definition”. It’s an inherently ambiguous notation; OP’s interpretation and the intended interpretation of it are both reasonable readings, and both give well-defined, useful, and commonly-used operations. The OP’s just isn’t the intended one. $\endgroup$ Jun 13, 2023 at 20:16

At the risk of being far too simplistic, but if you actually wonder why [-1,1]² is [0,1]. Well what you actually try to solve is what the interval of results of f(x) = x² is, if you take values from the interval [-1,1].

Now first thing to notice is that the negative interval behaves just like the positive so (-x)² = x² and that values > 0 stay >0. Now the biggest result for a square on that interval is the one for the biggest absolute value of x so -1 or 1 an the smallest that of the smallest absolute value so 0 and that's already it.

Now your problem is that [-1,1]*[-1,1] is f(x,y) = x*y, but this is not the same as f(x) = x² so you either have to explicitly force that you're interested in x*y for x,y∈[-1,1] AND x=y or you just need to use x² and only 1 interval.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .