({{, x\[VectorLessEqual]y or (RefLink[VectorLessEqual, paclet:ref/VectorLessEqual])[{x,y}]
yields (RefLink[True, paclet:ref/True]) for vectors of length n if (Subscript[x, i])≤(Subscript[y, i]) for all components 1≤i≤n.}, {, x(Subscript[\[VectorLessEqual], κ])y or (RefLink[VectorLessEqual, paclet:ref/VectorLessEqual])[{x,y},κ]
yields (RefLink[True, paclet:ref/True]) for x and y if y-x∈κ, where κ is a proper convex cone.}})

OpenersNotesSection(Spacer1)Details

(RefLink[VectorLessEqual, paclet:ref/VectorLessEqual]) gives a partial ordering of elements in a vector space that is still compatible with vector space operations.

(RefLink[VectorLessEqual, paclet:ref/VectorLessEqual]) is typically used to specify vector inequalities for constrained optimization, inequality solving and integration.

By using the character \[VectorLessEqual], entered as (Key0[esc]) v<=(Key0[esc]) or (RefLink[\[VectorLessEqual], paclet:ref/character/VectorLessEqual]), with subscripts vector inequalities can be entered as follows:

x\[VectorLessEqual]y remains unevaluated if x or y has non-numeric elements; typically gives (RefLink[True, paclet:ref/True]) or (RefLink[False, paclet:ref/False]) otherwise.

When x and y are n-vectors, x\[VectorLessEqual]y yields (RefLink[False, paclet:ref/False]) if (Subscript[x, i])>(Subscript[y, i]) for any component 1≤i≤n.

When x is an n-vector and y is a scalar, x\[VectorLessEqual]y yields (RefLink[True, paclet:ref/True]) if (Subscript[x, i])≤y for all components 1≤i≤n.

Possible cone specifications κ in 0(Subscript[\[VectorLessEqual], κ])x for vectors x include:

Possible cone specifications κ in 0(Subscript[\[VectorLessEqual], κ])x for matrices x include:

Possible cone specifications κ in 0(Subscript[\[VectorLessEqual], κ])x for arrays x include:

For exact numeric quantities, (RefLink[VectorLessEqual, paclet:ref/VectorLessEqual]) internally uses numerical approximations to establish numerical ordering. This process can be affected by the setting of the global variable (RefLink[$MaxExtraPrecision, paclet:ref/$MaxExtraPrecision]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (21)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

x\[VectorLessEqual]y yields (RefLink[True, paclet:ref/True]) when (Subscript[x, i])≤(Subscript[y, i]) is (RefLink[True, paclet:ref/True]) for all i=1,…,n:

{1,2,3}\[VectorLessEqual]{1,3,4}

x\[VectorLessEqual]y yields (RefLink[False, paclet:ref/False]) when (Subscript[x, i])>(Subscript[y, i]) is (RefLink[False, paclet:ref/False]) for any i=1,…,n:

{1,2,3}\[VectorLessEqual]{1,2,1}

Represent a vector inequality:

vi = {1,2,3}\[VectorLessEqual]v

When v is replaced by numerical vector space elements, the inequality gives (RefLink[True, paclet:ref/True]) or (RefLink[False, paclet:ref/False]):

vi /. v->3

vi /. v->{2,1,3}

OpenersExampleSection1(Spacer1)Scope  (7)

Determine if all of the elements in a vector are non-negative:

v = RandomReal[1,10];

0\[VectorLessEqual]v

Determine if all components are less than or equal to 1:

v\[VectorLessEqual]1

!x\[VectorLessEqual]y does not imply x\[VectorGreater]y:

x = {1,0};
y = {0,1};

!x\[VectorLessEqual]y

x\[VectorGreater]y

For each component, !(Subscript[x, i])≤(Subscript[y, i]) does imply (Subscript[x, i])>(Subscript[y, i]):

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}];

m1\[VectorLessEqual]m2

Compare symmetric matrices:

x = IdentityMatrix[3];y = DiagonalMatrix[{4,5,6}]; z =Dot[#,Transpose[#]]&[RandomReal[1,{3,3}]];

x(Subscript[\[VectorLessEqual], {"SemidefiniteCone",3}])y

PositiveSemidefiniteMatrixQ[y-x]

x(Subscript[\[VectorLessEqual], {"SemidefiniteCone",3}])z

PositiveSemidefiniteMatrixQ[z-x]

Represent the condition that (RefLink[Norm, paclet:ref/Norm])[{x,y}]<=1:

0(Subscript[\[VectorLessEqual], {"NormCone",3}]){x,y,1}

% /. {x->.5,y->.6}

Represent the condition that (e^x)≤z:

0(Subscript[\[VectorLessEqual], "ExponentialCone"]){x,1,z}

% /. {x->1,z->3}

Show where ((x)^α)(y^(1-α))≥|z| for non-negative x,y with α between 0 and 1:

Manipulate[RegionPlot3D[0(Subscript[\[VectorLessEqual], (PowerConeList[α])]){x,y,z},{x,0,2},{y,0,2},{z,-2,2}],{{α,.5},0.01,.99}]

OpenersExampleSection3(Spacer1)Applications  (8)

OpenersExampleSubsection0(Spacer1)Basic Applications  (1)

(RefLink[VectorLessEqual, paclet:ref/VectorLessEqual]) is a fast way to compare many elements:

v1 = RandomReal[{-1,0},10^7];
v2 = RandomReal[{1,0},10^7];

AbsoluteTiming[v1\[VectorLessEqual]v2]

AbsoluteTiming[AllTrue[v2-v1,NonNegative]]

OpenersExampleSubsection1(Spacer1)Optimization over Vector Inequalities  (1)

Minimize[{Total[x],0\[VectorLessEqual]x&&x∈Vectors[3,(Reals)]},x]

OpenersExampleSubsection2(Spacer1)Solving Vector Inequalities  (1)

The inequality (Subscript[p, min])\[VectorLessEqual]x\[VectorLessEqual](Subscript[p, max]) represents the cuboid (RefLink[Cuboid, paclet:ref/Cuboid])[(Subscript[p, min]),(Subscript[p, max])]:

{pmin,pmax}={{-1,-1},{1,1}};

Reduce[pmin\[VectorLessEqual]x\[VectorLessEqual]pmax&&x∈Vectors[2,(Reals)],x]

Reduce[x∈Cuboid[pmin,pmax],x]

OpenersExampleSubsection3(Spacer1)Integration over Vector Inequality Regions  (2)

Integrate exp(-((Subscript[x, 1])+(Subscript[x, 2]))) over the non-negative quadrant 0\[VectorLessEqual]{(Subscript[x, 1]),(Subscript[x, 2])}:

Integrate[Exp[-((Subscript[x, 1])+(Subscript[x, 2]))]Boole[0\[VectorLessEqual]{(Subscript[x, 1]),(Subscript[x, 2])}],{(Subscript[x, 1]),-∞,∞},{(Subscript[x, 2]),-∞,∞}]

Using vector variables:

Integrate[Exp[-Total[x]]Boole[0\[VectorLessEqual]x],x∈FullRegion[2]]

Integrate[Exp[-Norm[x,1]]Boole[0\[VectorLessEqual]x],x∈FullRegion[2]]

Integrate exp(-((Subscript[x, 1])+⋯+(Subscript[x, 10]))) over the non-negative orthant:

Integrate[Exp[-Total[x]]Boole[0\[VectorLessEqual]x],x∈FullRegion[10]]

Integrate exp(-((Subscript[x, 1])+(Subscript[x, 2]))) over the rectangle {-1,-1}\[VectorLessEqual]{(Subscript[x, 1]),(Subscript[x, 2])}\[VectorLessEqual]{1,1}:

Integrate[Exp[-((Subscript[x, 1])+(Subscript[x, 2]))]Boole[{-1,-1}\[VectorLessEqual]{(Subscript[x, 1]),(Subscript[x, 2])}\[VectorLessEqual]{1,1}],{(Subscript[x, 1]),(Subscript[x, 2])}∈FullRegion[2]]

Using vector variables:

Integrate[Exp[-Total[x]]Boole[{-1,-1}\[VectorLessEqual]x\[VectorLessEqual]{1,1}],x∈FullRegion[2]]

Integrate exp(-((Subscript[x, 1])+⋯+(Subscript[x, 10]))) over the cuboid {-1,…,-1}\[VectorLessEqual]x\[VectorLessEqual]{1,…,1}:

{pmin,pmax}={ConstantArray[-1,{10}],ConstantArray[1,{10}]};

Integrate[Exp[-Total[x]]Boole[pmin\[VectorLessEqual]x\[VectorLessEqual]pmax],x∈FullRegion[10]]

OpenersExampleSubsection5(Spacer1)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 μ (Subscript[ℐ, n])(Underscript[\[VectorLessEqual], κ])A(Underscript[\[VectorLessEqual], κ])λ (Subscript[ℐ, n]), where (Subscript[ℐ, n])=(RefLink[IdentityMatrix, paclet:ref/IdentityMatrix])[n] and κ="SemidefiniteCone". This finds the set of symmetric matrices A with eigenvalues between 1 and 2, i.e. 1≤λ(A)≤2:

(Subscript[ℐ, n_]):=IdentityMatrix[n];

Reduce[1 (Subscript[ℐ, 2])(Underscript[\[VectorLessEqual], (SemidefiniteConeList[2])]){{a,b},{b,c}}(Underscript[\[VectorLessEqual], (SemidefiniteConeList[2])])2 (Subscript[ℐ, 2]),{a,b,c}]

Formulate the same problem using matrix variables:

Reduce[1 (Subscript[ℐ, 2])(Underscript[\[VectorLessEqual], (SemidefiniteConeList[2])])A(Underscript[\[VectorLessEqual], (SemidefiniteConeList[2])])2 (Subscript[ℐ, 2])&&A∈Matrices[{2,2},(Reals)],A]

Find an instance of such a matrix:

FindInstance[1 (Subscript[ℐ, 2])(Underscript[\[VectorLessEqual], (SemidefiniteConeList[2])]){{a,b},{b,c}}(Underscript[\[VectorLessEqual], (SemidefiniteConeList[2])])2 (Subscript[ℐ, 2]),{a,b,c}]

Check the result:

Eigenvalues[{{a,b},{b,c}}/.First[%]]

OpenersExampleSection4(Spacer1)Properties & Relations  (3)

Vector orders are compatible with with a vector space operation:

{a,b}={{1,1},{1,3}};

Adding vectors to both sides a\[VectorLessEqual]b=>a+c\[VectorLessEqual]b+c for any vector c:

c={2,1};

{a\[VectorLessEqual]b,a+c\[VectorLessEqual]b+c}

Resolve[ForAll[{a,b,c},(a|b|c)∈Vectors[2,(Reals)],a\[VectorLessEqual]b\[Implies]a+c\[VectorLessEqual]b+c]]

Multiplying by positive constants a\[VectorLessEqual]b=>α a\[VectorLessEqual]α b for any α>0:

α=1/2;

{a\[VectorLessEqual]b,α a\[VectorLessEqual]α b}

Resolve[ForAll[{a,b,α},(a|b)∈Vectors[2,(Reals)]∧α∈(PositiveReals),a\[VectorLessEqual]b\[Implies]α a\[VectorLessEqual]α b],(Reals)]

{a,b,c}={{0,0},{1,2},{2,3}};

Reflexive, i.e. a\[VectorLessEqual]a for all elements a:

a\[VectorLessEqual]a

Resolve[ForAll[a,a∈Vectors[2,Reals],a\[VectorLessEqual]a]]

Antisymmetric, i.e. if a\[VectorLessEqual]b and b\[VectorLessEqual]a then a==b:

Resolve[ForAll[{a,b},(a|b)∈Vectors[2,Reals],a\[VectorLessEqual]b∧b\[VectorLessEqual]a\[Implies]a==b],Reals]

Transitive, i.e. if a\[VectorLessEqual]b and b\[VectorLessEqual]c then a\[VectorLessEqual]c:

Resolve[ForAll[{a,b,c},(a|b|c)∈Vectors[2,Reals],a\[VectorLessEqual]b∧b\[VectorLessEqual]c\[Implies]a\[VectorLessEqual]a]]

Vector orders are partial orders but not total orders, so there are incomparable elements:

{a,b}={{1,1},{2,0}};

Neither a\[VectorLessEqual]b nor b\[VectorLessEqual]a is true, because a and b are incomparable elements:

{a\[VectorLessEqual]b,b\[VectorLessEqual]a}

The set of vectors 0\[VectorLessEqual]x and x\[VectorLessEqual]0. These are the comparable elements to 0:

{RegionPlot[{0,0}\[VectorLessEqual]{(Subscript[x, 1]),(Subscript[x, 2])},{(Subscript[x, 1]),-1,1},{(Subscript[x, 2]),-1,1}],RegionPlot[{(Subscript[x, 1]),(Subscript[x, 2])}\[VectorLessEqual]{0,0},{(Subscript[x, 1]),-1,1},{(Subscript[x, 2]),-1,1}]}

OpenersExampleSection5(Spacer1)Possible Issues  (1)

Vector orders are partial orders, so the negation of a\[VectorLessEqual]b is not equivalent to a\[VectorGreater]b:

{a,b}={{1,1},{2,0}};

Here both a\[VectorLessEqual]b and a\[VectorGreater]b are false:

{a\[VectorLessEqual]b,a\[VectorGreater]b}

Visualize ¬0\[VectorLessEqual]x and 0\[VectorGreater]x. The difference between these sets are incomparable elements:

{RegionPlot[Not[{0,0}\[VectorLessEqual]{(Subscript[x, 1]),(Subscript[x, 2])}],{(Subscript[x, 1]),-1,1},{(Subscript[x, 2]),-1,1}],
RegionPlot[{0,0}\[VectorGreater]{(Subscript[x, 1]),(Subscript[x, 2])},{(Subscript[x, 1]),-1,1},{(Subscript[x, 2]),-1,1}]}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[LessEqual, paclet:ref/LessEqual])  ▪  (RefLink[VectorLess, paclet:ref/VectorLess])  ▪  (RefLink[VectorGreaterEqual, paclet:ref/VectorGreaterEqual])  ▪  (RefLink[NonNegativeReals, paclet:ref/NonNegativeReals])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Convex Optimization, paclet:guide/ConvexOptimization])}})}})