And 
Details
- And[e1,e2,…] can be input in StandardForm and InputForm as e1∧e2∧…. The character ∧ can be entered as
&&
,
and
, or \[And]. » - And has attribute HoldAll and explicitly controls the evaluation of its arguments. In e1&&e2&&…, the ei are evaluated in order, stopping if any of them are found to be False. »
- And gives symbolic results when necessary, removing initial arguments that are True. »
Examples
open all close allBasic Examples (4)
Scope (5)
And works with any number of arguments:
And[x, y, z]And is associative:
And[x, And[y, z]]//FullFormAnd with explicit True or False arguments will simplify:
And[x, True, z]And[x, False, z]And evaluates its arguments in order, stopping when an argument evaluates to False:
And[Print[1];False, Print[2];True]And[Print[1];True, Print[2];True]The order of arguments may be important:
x ≠ 0 && y == 1 / x /. x -> 0y == 1 / x && x ≠ 0 /. x -> 0Symbolic transformations will not preserve argument ordering:
z && y && y && xSimplify[%]TraditionalForm formatting:
x && y && z//TraditionalFormApplications (6)
Combine conditions in Wolfram Language code:
PositiveNumberQ[x_] := NumberQ[x] && Head[x] =!= Complex && x > 0PositiveNumberQ[1]If an argument of And evaluates to False, any subsequent arguments are not evaluated:
PositiveNumberQ[I]The argument order in And matters; if the last two arguments are reversed, I>0 is evaluated:
PositiveNumberQ2[x_] := NumberQ[x] && x > 0 && Head[x] =!= ComplexPositiveNumberQ2[I]Refine[(a ^ b) ^ c, a ≥ 0 && Element[b, Reals]]Combine equations and inequalities; And is used both in the input and in the output:
Reduce[x ^ 2 + y ^ 2 == 1 && x ≥ y, {x, y}]Use And to combine conditions:
RegionPlot[x ^ 2 + y ^ 2 < 1 && x + y > 0, {x, -2, 2}, {y, -2, 2}]RegionPlot3D[x ^ 2 + y ^ 2 + z ^ 2 < 1 && x ^ 2 + y ^ 2 < z ^ 2, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}]A cellular automaton based on And:
ArrayPlot[Boole[CellularAutomaton[{And@@#&, {}}, RandomChoice[{True, False}, 40], 20]]]Find the area of the intersection of sets given by algebraic conditions:
Integrate[Boole[x ^ 2 + y ^ 2 < 1 && (x - 1) ^ 2 + y ^ 2 < 2], {x, -Infinity, Infinity}, {y, -Infinity, Infinity}]RegionPlot[x ^ 2 + y ^ 2 < 1 && (x - 1) ^ 2 + y ^ 2 < 2, {x, -1.5, 2.5}, {y, -2, 2}]Properties & Relations (8)
Truth table for binary And:
BooleanTable[{x, y, And[x, y]}, {x, y}]//GridTernary And:
BooleanTable[{x, y, z, And[x, y, z]}, {x, y, z}]//GridAnd[]And with a single argument will return the evaluated argument regardless of value:
And[2 + 2]&& has higher precedence than ||:
p || q && r//FullFormUse BooleanConvert to expand And with respect to Or:
(a || b) && (c || d || e)BooleanConvert[%]De Morgan's laws relate And, Or, and Not:
BooleanConvert[!(a && b)]BooleanConvert[!(a || b || c)]Conjunction of conditions corresponds to the product or Min of Boole functions:
Boole[a]Boole[b] - Boole[a && b]Simplify[%]Min[Boole[a], Boole[b]] - Boole[a && b]Simplify[%]Use Thread to thread over lists:
{p, q} && {r, s}Thread[%]See Also
BooleanConvert LogicalExpand BitAnd Nand Or Not Conjunction Intersection BooleanCountingFunction AllTrue
Characters: \[And]
Function Repository: VennDiagram
History
Introduced in 1988 (1.0) | Updated in 1996 (3.0)
Text
Wolfram Research (1988), And, Wolfram Language function, https://reference.wolfram.com/language/ref/And.html (updated 1996).
CMS
Wolfram Language. 1988. "And." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1996. https://reference.wolfram.com/language/ref/And.html.
APA
Wolfram Language. (1988). And. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/And.html
BibTeX
@misc{reference.wolfram_2026_and, author="Wolfram Research", title="{And}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/And.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_and, organization={Wolfram Research}, title={And}, year={1996}, url={https://reference.wolfram.com/language/ref/And.html}, note=[Accessed: 12-June-2026]}