Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Discrete Mathematics > Boolean Computation > And (&&, ) >
Mathematica > Mathematics and Algorithms > Logic & Boolean Algebra > Boolean Computation > And (&&, ) >
Mathematica > Mathematics and Algorithms > Graphs & Networks > Graph Programming > Boolean Computation > And (&&, ) >

And


is the logical AND function. It evaluates its arguments in order, giving False immediately if any of them are False, and True if they are all True.
  • And has attribute HoldAll, and explicitly controls the evaluation of its arguments. In , the 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. »
Combine assertions with :
A symbolic conjunction:
A system of equations:
Enter using Esc and Esc:
Combine assertions with :
In[1]:=
Click for copyable input
Out[1]=
 
A symbolic conjunction:
In[1]:=
Click for copyable input
Out[1]=
 
A system of equations:
In[1]:=
Click for copyable input
Out[1]=
 
Enter using Esc and Esc:
In[1]:=
Click for copyable input
Out[1]=
And works with any number of arguments:
And is associative:
And with explicit True or False arguments will simplify:
And evaluates its arguments in order, stopping when an argument evaluates to False:
The order of arguments may be important:
Symbolic transformations will not preserve argument ordering:
TraditionalForm formatting:
Combine conditions in Mathematica code:
If an argument of And evaluates to False, any subsequent arguments are not evaluated:
The argument order in And matters; if the last two arguments are reversed, I is evaluated:
Combine assumptions:
Combine equations and inequalities; And is used both in the input and in the output:
Use And to combine conditions:
A cellular automaton based on And:
Find the area of the intersection of sets given by algebraic conditions:
This shows the set:
Truth table for And:
has higher precedence than :
Use BooleanConvert to expand And with respect to Or:
De Morgan's laws relate And, Or, and Not:
Conjunction of conditions corresponds to the product or Min of Boole functions:
Use Thread to thread over lists:
New in 1 | Last modified in 3
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF