---
title: "Less"
language: "en"
type: "Symbol"
summary: "x < y yields True if x is determined to be less than y. x1 < x2 < x3 yields True if the xi form a strictly increasing sequence."
keywords: 
- inequality
- less
- less than
- strict inequality
- strictly less than
- strong inequality
- strongly less than
- isless
- <
canonical_url: "https://reference.wolfram.com/language/ref/Less.html"
source: "Wolfram Language Documentation"
related_guides: 
  - 
    title: "Inequalities"
    link: "https://reference.wolfram.com/language/guide/Inequalities.en.md"
  - 
    title: "Assumptions and Domains"
    link: "https://reference.wolfram.com/language/guide/AssumptionsAndDomains.en.md"
  - 
    title: "Numerical Functions"
    link: "https://reference.wolfram.com/language/guide/NumericalFunctions.en.md"
  - 
    title: "Testing Expressions"
    link: "https://reference.wolfram.com/language/guide/TestingExpressions.en.md"
  - 
    title: "Procedural Programming"
    link: "https://reference.wolfram.com/language/guide/ProceduralProgramming.en.md"
related_functions: 
  - 
    title: "LessEqual"
    link: "https://reference.wolfram.com/language/ref/LessEqual.en.md"
  - 
    title: "Greater"
    link: "https://reference.wolfram.com/language/ref/Greater.en.md"
  - 
    title: "LessThan"
    link: "https://reference.wolfram.com/language/ref/LessThan.en.md"
  - 
    title: "AsymptoticLess"
    link: "https://reference.wolfram.com/language/ref/AsymptoticLess.en.md"
  - 
    title: "NumericalOrder"
    link: "https://reference.wolfram.com/language/ref/NumericalOrder.en.md"
  - 
    title: "Positive"
    link: "https://reference.wolfram.com/language/ref/Positive.en.md"
  - 
    title: "Element"
    link: "https://reference.wolfram.com/language/ref/Element.en.md"
  - 
    title: "RegionPlot"
    link: "https://reference.wolfram.com/language/ref/RegionPlot.en.md"
  - 
    title: "RegionPlot3D"
    link: "https://reference.wolfram.com/language/ref/RegionPlot3D.en.md"
related_tutorials: 
  - 
    title: "Relational and Logical Operators"
    link: "https://reference.wolfram.com/language/tutorial/ManipulatingEquationsAndInequalities.en.md#7679"
---
# Less (<)

x < y yields True if $x$ is determined to be less than $y$. 

x1 < x2 < x3 yields True if the $x_i$ form a strictly increasing sequence.

## Details

* ``Less`` is also known as strong inequality or strict inequality.

* ``Less`` gives ``True`` or ``False`` when its arguments are real numbers.

* ``Less`` does some simplification when its arguments are not numbers.

* For exact numeric quantities, ``Less`` internally uses numerical approximations to establish numerical ordering. This process can be affected by the setting of the global variable ``\$MaxExtraPrecision``.

---

## Examples (26)

### Basic Examples (2)

Compare numbers:

```wl
In[1]:= 1 < 0

Out[1]= False

In[2]:= 2 / 17 < 1 / 5 < Pi / 10

Out[2]= True
```

---

Represent an inequality:

```wl
In[1]:= x ^ 3 - 2x + 1 < 0

Out[1]= 1 - 2 x + x^3 < 0

In[2]:= Reduce[%, x]

Out[2]= x < (1/2) (-1 - Sqrt[5]) || (1/2) (-1 + Sqrt[5]) < x < 1
```

### Scope (9)

#### Numeric Inequalities (7)

Inequalities are defined only for real numbers:

```wl
In[1]:= I < 0
```

Less::nord: Invalid comparison with I attempted.

```wl
Out[1]= I < 0
```

---

Compare rational numbers:

```wl
In[1]:= 3 / 2 < 5 / 3

Out[1]= True
```

---

Approximate numbers that differ in at most their last eight binary digits are considered equal:

```wl
In[1]:= 1. < 1. + 2 ^ 7 10 ^ -16

Out[1]= False

In[2]:= 1. < 1. + 2 ^ 8 10 ^ -16

Out[2]= True
```

---

Compare an exact numeric expression and an approximate number:

```wl
In[1]:= N[Pi, 20] < Pi

Out[1]= False

In[2]:= N[Pi, 20] < Pi(1 + 2 ^ 12 10 ^ -20)

Out[2]= True
```

---

Compare two exact numeric expressions; a numeric test may suffice to prove inequality:

```wl
In[1]:= Pi ^ E < E ^ Pi

Out[1]= True
```

Disproving this inequality requires symbolic methods:

```wl
In[2]:= Sqrt[2] + Sqrt[3] < Sqrt[5 + 2Sqrt[6]]

Out[2]= False
```

---

Symbolic and numeric methods used by ``Less`` are insufficient to disprove this inequality:

```wl
In[1]:= Sqrt[2] + Sqrt[3] < Root[# ^ 4 - 10# ^ 2 + 1&, 4]
```

Less::meprec: Internal precision limit \$MaxExtraPrecision = 50.\` reached while evaluating Sqrt[2]+Sqrt[3]-Root[1-10 Slot[<<1>>]^2+\#1^4&,4,0].

```wl
Out[1]= Sqrt[2] + Sqrt[3] < Root[1 - 10*#1^2 + #1^4 & , 4, 0]
```

Use ``RootReduce`` to decide the sign of algebraic numbers:

```wl
In[2]:= RootReduce[%[[1]] - %[[2]]] < 0

Out[2]= False
```

---

Numeric methods used by ``Less`` do not use sufficient precision to prove this inequality:

```wl
In[1]:= Sqrt[2] + Sqrt[3] < Root[# ^ 4 - 10# ^ 2 + 1&, 4] + 10 ^ -100
```

Less::meprec: Internal precision limit \$MaxExtraPrecision = 50.\` reached while evaluating -(1/10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)+Sqrt[2]+Sqrt[3]-Root[1-10 Slot[<<1>>]^2+\#1^4&,4,0].

```wl
Out[1]= Sqrt[2] + Sqrt[3] < 1 / 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + Root[1 - 10*#1^2 + #1^4 & , 4, 0]
```

``RootReduce`` proves the inequality using exact methods:

```wl
In[2]:= RootReduce[%[[1]] - %[[2]]] < 0

Out[2]= True
```

Increasing ``\$MaxExtraPrecision`` may also prove the inequality:

```wl
In[3]:= Block[{$MaxExtraPrecision = 100}, Sqrt[2] + Sqrt[3] < Root[# ^ 4 - 10# ^ 2 + 1&, 4] + 10 ^ -100]

Out[3]= True
```

#### Symbolic Inequalities (2)

Symbolic inequalities remain unevaluated, since ``x`` may not be a real number:

```wl
In[1]:= x < x

Out[1]= x < x
```

Use ``Refine`` to reevaluate the inequality assuming that ``x`` is real:

```wl
In[2]:= Refine[%, Element[x, Reals]]

Out[2]= False
```

---

A symbolic inequality:

```wl
In[1]:= ineq = 1 < x ^ 2 + y ^ 2 < 2

Out[1]= 1 < x^2 + y^2 < 2
```

Use ``Reduce`` to find an explicit description of the solution set:

```wl
In[2]:= Reduce[ineq, {x, y}]

Out[2]= (-Sqrt[2] < x < -1 && -Sqrt[2 - x^2] < y < Sqrt[2 - x^2]) || (-1 ≤ x ≤ 1 && (-Sqrt[2 - x^2] < y < -Sqrt[1 - x^2] || Sqrt[1 - x^2] < y < Sqrt[2 - x^2])) || (1 < x < Sqrt[2] && -Sqrt[2 - x^2] < y < Sqrt[2 - x^2])
```

Use ``FindInstance`` to find a solution instance:

```wl
In[3]:= FindInstance[ineq, {x, y}]

Out[3]= {{x -> 0, y -> Sqrt[(3/2)]}}
```

Use ``Minimize`` to optimize over the inequality-defined region:

```wl
In[4]:= Minimize[{x ^ 2 - y ^ 2, ineq}, {x, y}]
```

Minimize::wksol: Warning: There is no minimum in the region described by the constraints; returning a result on the boundary.

```wl
Out[4]= {-2, {x -> 0, y -> -Sqrt[2]}}
```

Use ``Refine`` to simplify under the inequality-defined assumptions:

```wl
In[5]:= Refine[Sqrt[(2 - x ^ 2) ^ 2], ineq]

Out[5]= 2 - x^2
```

### Properties & Relations (12)

The negation of two-argument ``Less`` is ``GreaterEqual`` :

```wl
In[1]:= Not[x < y]

Out[1]= x ≥ y
```

---

The negation of three-argument ``Less`` does not simplify automatically:

```wl
In[1]:= Not[x < y < z]

Out[1]= !x < y < z
```

Use ``LogicalExpand`` to express it in terms of two-argument ``GreaterEqual`` :

```wl
In[2]:= LogicalExpand[%]

Out[2]= x ≥ y || y ≥ z
```

This is not equivalent to three-argument ``GreaterEqual`` :

```wl
In[3]:= LogicalExpand[x ≥ y ≥ z]

Out[3]= x ≥ y && y ≥ z
```

---

When ``Less`` cannot decide inequality between numeric expressions it returns unchanged:

```wl
In[1]:=
a = Log[Sqrt[2] + Sqrt[3]];
b = Log[5 + 2Sqrt[6]] / 2;
a < b
```

Less::meprec: Internal precision limit \$MaxExtraPrecision = 50.\` reached while evaluating Log[Sqrt[2]+Sqrt[3]]-1/2 Log[5+2 Sqrt[6]].

```wl
Out[1]= Log[Sqrt[2] + Sqrt[3]] < (1/2) Log[5 + 2 Sqrt[6]]
```

``FullSimplify`` uses exact symbolic transformations to disprove the inequality:

```wl
In[2]:= FullSimplify[%]

Out[2]= False
```

---

``Negative[x]`` is equivalent to $x\in \mathbb{R}\land x<0$ :

```wl
In[1]:= Negative /@ {-1, 0, 1, I}

Out[1]= {True, False, False, False}
```

---

Use ``Reduce`` to solve inequalities:

```wl
In[1]:= Reduce[x ^ 5 - 3x + 2 < 0, x]

Out[1]= x < Root[-2 + #1 + #1^2 + #1^3 + #1^4 & , 1, 0] || Root[-2 + #1 + #1^2 + #1^3 + #1^4 & , 2, 0] < x < 1

In[2]:= Reduce[y ^ 2 - 4x ^ 2 + 4x ^ 4 < 0, {x, y}]

Out[2]= (-1 < x < 0 && -Sqrt[4 x^2 - 4 x^4] < y < Sqrt[4 x^2 - 4 x^4]) || (0 < x < 1 && -Sqrt[4 x^2 - 4 x^4] < y < Sqrt[4 x^2 - 4 x^4])
```

---

Use ``FindInstance`` to find solution instances:

```wl
In[1]:= FindInstance[y ^ 2 - 4x ^ 2 + 4x ^ 4 < -z ^ 2, {x, y, z}]

Out[1]= {{x -> (1/Sqrt[2]), y -> 0, z -> 0}}
```

---

Use ``RegionPlot`` and ``RegionPlot3D`` to visualize solution sets of inequalities:

```wl
In[1]:= RegionPlot[y ^ 2 - 4x ^ 2 + 4x ^ 4 < 0, {x, -1, 1}, {y, -1, 1}]

Out[1]= [image]

In[2]:= RegionPlot3D[y ^ 2 - 4x ^ 2 + 4x ^ 4 < -z ^ 2, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}]

Out[2]= [image]
```

---

Inequality assumptions:

```wl
In[1]:= Refine[Sqrt[x ^ 2], x < 0]

Out[1]= -x

In[2]:= Limit[a ^ n, n -> Infinity, Assumptions -> -1 < a < 1]

Out[2]= 0
```

---

Use ``Minimize`` and ``Maximize`` to solve optimization problems constrained by inequalities:

```wl
In[1]:= Minimize[{x - y, y ^ 2 - 4x ^ 2 + 4x ^ 4 < 0}, {x, y}]
```

Minimize::wksol: Warning: there is no minimum in the region in which the objective function is defined and the constraints are satisfied; returning a result on the boundary.

```wl
Out[1]= {Root[27 - 207*#1^2 + 64*#1^4 & , 1, 0], {x -> Root[27 - 207*#1^2 + 64*#1^4 & , 1, 0] + Root[48 - 111*#1^2 + 64*#1^4 & , 4, 0], y -> Root[48 - 111*#1^2 + 64*#1^4 & , 4, 0]}}
```

---

Use ``NMinimize`` and ``NMaximize`` to numerically solve constrained optimization problems:

```wl
In[1]:= NMinimize[{x - y, 1 < Tan[x] + Tan[y] < 2}, {x, y}]

Out[1]= {-3.14014, {x -> -1.57007, y -> 1.57007}}
```

---

``Integrate`` a function over the solution set of inequalities:

```wl
In[1]:= Integrate[x ^ 2 Boole[1 < x ^ 2 + y ^ 2 < 2], {x, -Infinity, Infinity}, {y, -Infinity, Infinity}]

Out[1]= (3 π/4)
```

---

Use ``Median``, ``Quantile``, and ``Quartiles`` to the $n$$$^{\text{th}}$$ greatest number(s):

```wl
In[1]:= {x1, x2, x3} = {1, 2, 3};

In[2]:= x1 < x2 < x3

Out[2]= True

In[3]:= Median[{x2, x3, x1}]

Out[3]= 2
```

### Possible Issues (3)

Inequalities for machine-precision approximate numbers can be subtle:

```wl
In[1]:= 0.00001 < 2.00006 - 2.00005

Out[1]= True
```

The strict inequality is based on extra digits:

```wl
In[2]:= 2.00006 - 2.00005//InputForm
```

Out[2]//InputForm= 0.000010000000000065512

---

Arbitrary-precision approximate numbers do not have this problem:

```wl
In[1]:= 0.00001`16 < 2.00006`16 - 2.00005`16

Out[1]= False
```

Thanks to automatic precision tracking, ``Less`` knows to look only at the first 10 digits:

```wl
In[2]:= Precision[2.00006`16 - 2.00005`16]

Out[2]= 10.3979
```

---

In this case, inequality between machine numbers gives the expected result:

```wl
In[1]:= 0.1 < 2.6 - 2.5

Out[1]= False
```

The extra digits in this case are ignored by ``Less`` :

```wl
In[2]:= 2.6 - 2.5//InputForm
```

Out[2]//InputForm= 0.10000000000000009

## See Also

* [`LessEqual`](https://reference.wolfram.com/language/ref/LessEqual.en.md)
* [`Greater`](https://reference.wolfram.com/language/ref/Greater.en.md)
* [`LessThan`](https://reference.wolfram.com/language/ref/LessThan.en.md)
* [`AsymptoticLess`](https://reference.wolfram.com/language/ref/AsymptoticLess.en.md)
* [`NumericalOrder`](https://reference.wolfram.com/language/ref/NumericalOrder.en.md)
* [`Positive`](https://reference.wolfram.com/language/ref/Positive.en.md)
* [`Element`](https://reference.wolfram.com/language/ref/Element.en.md)
* [`RegionPlot`](https://reference.wolfram.com/language/ref/RegionPlot.en.md)
* [`RegionPlot3D`](https://reference.wolfram.com/language/ref/RegionPlot3D.en.md)

## Tech Notes

* [Relational and Logical Operators](https://reference.wolfram.com/language/tutorial/ManipulatingEquationsAndInequalities.en.md#7679)

## Related Guides

* [`Inequalities`](https://reference.wolfram.com/language/guide/Inequalities.en.md)
* [Assumptions and Domains](https://reference.wolfram.com/language/guide/AssumptionsAndDomains.en.md)
* [Numerical Functions](https://reference.wolfram.com/language/guide/NumericalFunctions.en.md)
* [Testing Expressions](https://reference.wolfram.com/language/guide/TestingExpressions.en.md)
* [Procedural Programming](https://reference.wolfram.com/language/guide/ProceduralProgramming.en.md)

## Related Links

* [An Elementary Introduction to the Wolfram Language: Tests and Conditionals](https://www.wolfram.com/language/elementary-introduction/28-tests-and-conditionals.html)
* [NKS\|Online](http://www.wolframscience.com/nks/search/?q=Less)
* [A New Kind of Science](http://www.wolframscience.com/nks/)

## History

* Introduced in 1988 (1.0) \| Updated in 1996 (3.0)