xy or VectorLessEqual[{x,y}]
yields True for vectors of length n if xi≤yi for all components
.
xκy or VectorLessEqual[{x,y},κ]
yields True for x and y if y-x∈κ, where κ is a proper convex cone.
VectorLessEqual 
xy or VectorLessEqual[{x,y}]
yields True for vectors of length n if xi≤yi for all components
.
xκy or VectorLessEqual[{x,y},κ]
yields True for x and y if y-x∈κ, where κ is a proper convex cone.
Details
- VectorLessEqual gives a partial ordering of vectors, matrices and arrays that is compatible with vector space operations, so that
and
imply
for all
. - VectorLessEqual is typically used to specify vector inequalities for constrained optimization, inequality solving and integration. It is also used to define minimal elements in vector optimization.
- When x and y are
-vectors, xy is equivalent to
. That is, each part of x is less than or equal to the corresponding part of y for the relation to be true. - When x and y are dimension
arrays, xy is equivalent to
. That is, each part of x is less than or equal to the corresponding part of y for the relation to be true. - xy remains unevaluated if x or y has non-numeric elements; typically gives True or False otherwise.
- When x is an n-vector and y is a numeric scalar, xy yields True if xi≤y for all components
. - By using the character , entered as
v<=
or \[VectorLessEqual], with subscripts vector inequalities can be entered as follows: -

VectorLessEqual[{x,y}] the standard vector inequality 
VectorLessEqual[{x,y},κ] vector inequality defined by a cone κ - In general, one can use a proper convex cone κ to specify a vector inequality. The set
is the same as κ. - Possible cone specifications κ in
for vectors x include: -
{"NonNegativeCone", n} ![TemplateBox[{n}, NonNegativeConeList] TemplateBox[{n}, NonNegativeConeList]](Files/VectorLessEqual.en/21.png)
such that 
{"NormCone", n} ![TemplateBox[{n}, NormConeList] TemplateBox[{n}, NormConeList]](Files/VectorLessEqual.en/24.png)
such that Norm[{x1,…,xn-1}]≤xn"ExponentialCone" ![TemplateBox[{}, ExponentialConeString] TemplateBox[{}, ExponentialConeString]](Files/VectorLessEqual.en/26.png)
such that 
"DualExponentialCone" ![TemplateBox[{}, DualExponentialConeString] TemplateBox[{}, DualExponentialConeString]](Files/VectorLessEqual.en/29.png)
such that
or 
{"PowerCone",α} ![TemplateBox[{alpha}, PowerConeList] TemplateBox[{alpha}, PowerConeList]](Files/VectorLessEqual.en/33.png)
such that 
{"DualPowerCone",α} ![TemplateBox[{alpha}, DualPowerConeList] TemplateBox[{alpha}, DualPowerConeList]](Files/VectorLessEqual.en/36.png)
such that 
- Possible cone specifications κ in
for matrices x include: -
"NonNegativeCone" ![TemplateBox[{}, NonNegativeConeString] TemplateBox[{}, NonNegativeConeString]](Files/VectorLessEqual.en/40.png)
such that 
{"SemidefiniteCone", n} ![TemplateBox[{n}, SemidefiniteConeList] TemplateBox[{n}, SemidefiniteConeList]](Files/VectorLessEqual.en/43.png)
symmetric positive semidefinite matrices 
- Possible cone specifications κ in
for arrays x include: -
"NonNegativeCone" ![TemplateBox[{}, NonNegativeConeString] TemplateBox[{}, NonNegativeConeString]](Files/VectorLessEqual.en/46.png)
such that 
- For exact numeric quantities, VectorLessEqual internally uses numerical approximations to establish numerical ordering. This process can be affected by the setting of the global variable $MaxExtraPrecision.
Examples
open all close allBasic Examples (3)
xy yields True when xi≤yi is True for all i=1,…,n:
{1, 2, 3}{1, 3, 4}xy yields False when xi>yi is False for any i=1,…,n:
{1, 2, 3}{1, 2, 1}Represent a vector inequality:
vi = {1, 2, 3}vWhen v is replaced by numerical vector space elements, the inequality gives True or False:
vi /. v -> 3vi /. v -> {2, 1, 3}RegionPlot[{-2, -3}{Subscript[x, 1], Subscript[x, 2]}, ...]RegionPlot[{Subscript[x, 1], Subscript[x, 2]}{3, 2}, ...]RegionPlot[{-2, -3}{Subscript[x, 1], Subscript[x, 2]}{3, 2}, ...]Scope (7)
Determine if all of the elements in a vector are non-negative:
v = RandomReal[1, 10];0vDetermine if all components are less than or equal to 1:
v1x = {1, 0};
y = {0, 1};!xyxyFor each component, !xi≤yi does imply xi>yi:
TableForm[{Not /@ Thread[x ≤ y], Thread[x > y]}, TableHeadings -> {{HoldForm[!Subscript[x, i] ≤ Subscript[y, i]], HoldForm[Subscript[x, i] > Subscript[y, i]]}, {1, 2}}]Compare the components of two matrices:
m1 = RandomReal[{0, 1.01}, {4, 4}];
m2 = RandomReal[{.99, 2}, {4, 4}];m1m2x = IdentityMatrix[3];y = DiagonalMatrix[{4, 5, 6}]; z = Dot[#, Transpose[#]]&[RandomReal[1, {3, 3}]];xSubscript[, {"SemidefiniteCone", 3}]yPositiveSemidefiniteMatrixQ[y - x]xSubscript[, {"SemidefiniteCone", 3}]zPositiveSemidefiniteMatrixQ[z - x]Represent the condition that Norm[{x,y}]<=1:
0Subscript[, {"NormCone", 3}]{x, y, 1}% /. {x -> .5, y -> .6}Represent the condition that
:
0Subscript[, "ExponentialCone"]{x, 1, z}% /. {x -> 1, z -> 3}Show where
for non-negative x,y with α between 0 and 1:
Manipulate[RegionPlot3D[0Subscript[, {"PowerCone", α}]{x, y, z}, {x, 0, 2}, {y, 0, 2}, {z, -2, 2}], {{α, .5}, 0.01, .99}]Applications (8)
Basic Applications (1)
VectorLessEqual is a fast way to compare many elements:
v1 = RandomReal[{-1, 0}, 10 ^ 7];
v2 = RandomReal[{1, 0}, 10 ^ 7];AbsoluteTiming[v1v2]AbsoluteTiming[AllTrue[v2 - v1, NonNegative]]Optimization over Vector Inequalities (1)
Minimize[{Total[x], 0x && x∈Vectors[3, ℝ]}, x]Solving Vector Inequalities (1)
The inequality
represents the cuboid Cuboid[pmin,pmax]:
{pmin, pmax} = {{-1, -1}, {1, 1}};Reduce[pminxpmax && x∈Vectors[2, ℝ], x]Reduce[x∈Cuboid[pmin, pmax], x]Integration over Vector Inequality Regions (2)
Integrate
over the non-negative quadrant
:
Integrate[Exp[-(Subscript[x, 1] + Subscript[x, 2])]Boole[0{Subscript[x, 1], Subscript[x, 2]}], {Subscript[x, 1], -∞, ∞}, {Subscript[x, 2], -∞, ∞}]Integrate[Exp[-Total[x]]Boole[0x], x∈FullRegion[2]]Integrate[Exp[-Norm[x, 1]]Boole[0x], x∈FullRegion[2]]Integrate
over the non-negative orthant:
Integrate[Exp[-Total[x]]Boole[0x], x∈FullRegion[10]]Integrate
over the rectangle
:
Integrate[Exp[-(Subscript[x, 1] + Subscript[x, 2])]Boole[{-1, -1}{Subscript[x, 1], Subscript[x, 2]}{1, 1}], {Subscript[x, 1], Subscript[x, 2]}∈FullRegion[2]]Integrate[Exp[-Total[x]]Boole[{-1, -1}x{1, 1}], x∈FullRegion[2]]{pmin, pmax} = {ConstantArray[-1, {10}], ConstantArray[1, {10}]};Integrate[Exp[-Total[x]]Boole[pminxpmax], x∈FullRegion[10]]Matrix Inequalities (3)
Use the standard vector order to represent the set of non-negative matrices:
Reduce[0 ≤ {{a, b}, {c, d}}, {a, b, c, d}]Give the set of interval bounded matrices:
Reduce[0 ≤ {{a, b}, {c, d}} ≤ 1, {a, b, c, d}]Use the semidefinite cone to define the set of symmetric positive semidefinite matrices:
Reduce[VectorLessEqual[{0, {{a, b}, {b, c}}}, "SemidefiniteCone"], {a, b, c}]Define the set of symmetric matrices with smallest eigenvalue
and largest eigenvalue
by using
, where ℐn=IdentityMatrix[n] and κ="SemidefiniteCone". This finds the set of symmetric matrices
with eigenvalues between 1 and 2, i.e.
:
Subscript[ℐ, n_] := IdentityMatrix[n];Reduce[1 Subscript[ℐ, 2]Underscript[, {"SemidefiniteCone", 2}]{{a, b}, {b, c}}Underscript[, {"SemidefiniteCone", 2}]2 Subscript[ℐ, 2], {a, b, c}]Formulate the same problem using matrix variables:
Reduce[1 Subscript[ℐ, 2]Underscript[, {"SemidefiniteCone", 2}]AUnderscript[, {"SemidefiniteCone", 2}]2 Subscript[ℐ, 2] && A∈Matrices[{2, 2}, ℝ], A]Find an instance of such a matrix:
FindInstance[1 Subscript[ℐ, 2]Underscript[, {"SemidefiniteCone", 2}]{{a, b}, {b, c}}Underscript[, {"SemidefiniteCone", 2}]2 Subscript[ℐ, 2], {a, b, c}]Eigenvalues[{{a, b}, {b, c}} /. First[%]]Properties & Relations (3)
VectorLessEqual is compatible with a vector space operation:
{a, b} = {{1, 1}, {1, 3}};Adding vectors to both sides
for any vector
:
c = {2, 1};{ab, a + cb + c}Resolve[ForAll[{a, b, c}, (a | b | c)∈Vectors[2, ℝ], aba + cb + c]]Multiplying by positive constants
for any
:
α = 1 / 2;{ab, α aα b}Resolve[ForAll[{a, b, α}, (a | b)∈Vectors[2, ℝ]∧α∈PositiveReals, abα aα b], ℝ]xy is a (non-strict) partial order, i.e. reflexive, antisymmetric and transitive:
{a, b, c} = {{0, 0}, {1, 2}, {2, 3}};Reflexive, i.e.
for all elements
:
aaResolve[ForAll[a, a∈Vectors[2, Reals], aa], Reals]Antisymmetric, i.e. if
and
then
:
Resolve[ForAll[{a, b}, (a | b)∈Vectors[2, Reals], ab∧baa == b], Reals]Transitive, i.e. if
and
then
:
Resolve[ForAll[{a, b, c}, (a | b | c)∈Vectors[2, Reals], ab∧bcaa], Reals]xκy are partial orders but not total orders, so there are incomparable elements:
{a, b} = {{1, 1}, {2, 0}};Neither
nor
is true, because
and
are incomparable elements:
{ab, ba}The set of vectors
and
. These are the comparable elements to
:
{RegionPlot[{0, 0}{Subscript[x, 1], Subscript[x, 2]}, {Subscript[x, 1], -1, 1}, {Subscript[x, 2], -1, 1}], RegionPlot[{Subscript[x, 1], Subscript[x, 2]}{0, 0}, {Subscript[x, 1], -1, 1}, {Subscript[x, 2], -1, 1}]}Possible Issues (1)
Vector orders are partial orders, so the negation of
is not equivalent to
:
{a, b} = {{1, 1}, {2, 0}};{ab, ab}Visualize
and
. The difference of these sets consists of incomparable elements:
{RegionPlot[Not[{0, 0}{Subscript[x, 1], Subscript[x, 2]}], {Subscript[x, 1], -1, 1}, {Subscript[x, 2], -1, 1}],
RegionPlot[{0, 0}{Subscript[x, 1], Subscript[x, 2]}, {Subscript[x, 1], -1, 1}, {Subscript[x, 2], -1, 1}]}Related Guides
History
Text
Wolfram Research (2019), VectorLessEqual, Wolfram Language function, https://reference.wolfram.com/language/ref/VectorLessEqual.html.
CMS
Wolfram Language. 2019. "VectorLessEqual." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/VectorLessEqual.html.
APA
Wolfram Language. (2019). VectorLessEqual. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VectorLessEqual.html
BibTeX
@misc{reference.wolfram_2026_vectorlessequal, author="Wolfram Research", title="{VectorLessEqual}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/VectorLessEqual.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_vectorlessequal, organization={Wolfram Research}, title={VectorLessEqual}, year={2019}, url={https://reference.wolfram.com/language/ref/VectorLessEqual.html}, note=[Accessed: 13-June-2026]}