Skip to main content
Mathematics LibreTexts

3.2.2: Conditional Statements

  • Page ID
    74307
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    3.2.2 Learning Objectives

    • Determine whether a conditional statement is true or false

    In logic a statement is something that is either true or false. A statement like 3 < 5 is true; a statement like “a rat is a fish” is false. A statement like “\(x < 5\)” is true for some values of \(x\) and false for others. When an action is taken or not depending on the value of a statement, it forms a conditional.

    Definition: Statement and Conditional

    A statement is either true or false.

    A conditional is a compound statement of the form

    "if \(p\) then \(q\)" or "if \(p\) then \(q\), else \(s\)"

    where \(p\) and \(q\) are both statements.

    Example 1

    In common language, an example of a conditional statement would be “If it is raining, then we’ll go to the mall. Otherwise we’ll go for a hike.”

    The statement “If it is raining” is the condition – this may be true or false for any given day. If the condition is true, then we will follow the first course of action, and go to the mall. If the condition is false, then we will use the alternative, and go for a hike.

    "If \(p\), then \(q\)" can be stated different ways and still mean the same thing. The following statements all could be rewritten using the if, then format.  Here p represents "I receive my check tomorrow," and q represents "I pay off my debt."

    \(\begin{array}{|l|l|}
    \hline \text { If p, then q} & \text { If I receive my check tomorrow, then I will pay off my debt. } \\
    \hline \text { p is sufficient for q } & \text { Receiving my check tomorrow is sufficient for paying off my debt. } \\
    \hline \text { p will lead to q } & \text { Receiving my check tomorrow will lead to the paying off my debt. }  \\
    \hline \text { p implies q } & \text { Receiving my check tomorrow implies paying off my debt. }   \\
    \hline \text { p is necessary for q } & \text { Receiving my check tomorrow is necessary for paying off my debt . } \\
    \hline \text { q if p } & \text { I will pay off my debt if I receive my check tomorrow. }  \\ \hline \text { q whenever p } & \text { I will pay off my debt whenever I receive my check. .}  \\
    \hline
    \end{array}\)

    As we did earlier, we can create more complex conditions by using the operators and, or, and not to join simpler conditions together.

    Example 2

    A parent might say to their child “if you clean your room and take out the garbage, then you can have ice cream.”

    Here, there are two simpler conditions:

    1) The child cleaning her room

    2) The child taking out the garbage

    Since these conditions were joined with and, the combined conditional will be true only if both simpler conditions are true; if either chore is not completed, then the parent’s condition is not met.

    Notice that if the parent had said “if you clean your room or take out the garbage, then you can have ice cream”, then the child would need to complete only one chore to meet the condition.

     


    This page titled 3.2.2: Conditional Statements is shared under a CC BY-SA license and was authored, remixed, and/or curated by Leah Griffith, Veronica Holbrook, Johnny Johnson & Nancy Garcia.