# Logic (Geometry)

See how to find the truth value of a statement

by using logic.

30 examples and their solutions.

## Statement

### Definition

Statement: ( o ) or ( x )

A statement is a sentencethat is either true ( o ) or false ( x ).

## Negation

### Definition

~p

[~p] is the negation of p.It means [not p].

### Example

Find the negation of the given statement.

5 is a positive number.

Solution 5 is a positive number.

p: 5 is a positive number.

~p: 5 is not a positive number.

~p: 5 is not a positive number.

Close

### Example

Find the negation of the given statement.

1 + 2 = 0

Solution 1 + 2 = 0

p: 1 + 2 = 0

~p: 1 + 2 ≠ 0

~p: 1 + 2 ≠ 0

Close

### Example

Find the negation of the given statement.

2 is not an odd number.

Solution 2 is not an odd number.

p: 2 is not an odd number.

~p: 2 is an odd number. - [1]

~p: 2 is an odd number. - [1]

[1]

Negation of 'is not' → 'is'

Close

### Truth Value

p | ~p |
---|---|

o | x |

x | o |

### Example

p: 5 is a positive number.

Truth value of ~p?

Solution Truth value of ~p?

p: ( o )- [1]

~p: ( x )

False

~p: ( x )

False

[1]

5 is a positive number.

So p is true.

So p is true.

Close

### Example

q: 3 is an even number.

Truth value of ~q?

Solution Truth value of ~q?

q: ( x )- [1]

~q: ( o )

True

~q: ( o )

True

[1]

3 is not an even number.

So q is false.

So q is false.

Close

### Example

Solution

Close

r: ( o )- [1]

~r: ( x )

~(~r): ( o )- [2]

True

~r: ( x )

~(~r): ( o )- [2]

True

[1]

[2]

~r is false.

So its negation, ~(~r), is true.

So its negation, ~(~r), is true.

Close

## Conjunction

### Definition

p ∧ q

[p ∧ q] is the conjunction of p and q.It means [p and q].

### Truth Value

p | q | p ∧ q |
---|---|---|

o | o | o |

o | x | x |

x | o | x |

x | x | x |

if both p and q are true.

### Example

p: 5 is a positive number.

q: 1 + 1 = 3

Truth value of p ∧ q?

Solution q: 1 + 1 = 3

Truth value of p ∧ q?

p: ( o )

q: ( x )

p ∧ q: ( x )

False

q: ( x )

p ∧ q: ( x )

False

Close

### Example

p: 5 is a positive number.

r: 4 > 2

Truth value of p ∧ r?

Solution r: 4 > 2

Truth value of p ∧ r?

p: ( o )

r: ( o )

p ∧ r: ( o )

True

r: ( o )

p ∧ r: ( o )

True

Close

## Disjunction

### Definition

p ∨ q

[p ∨ q] is the disjunction of p and q.It means [p or q].

### Truth Value

p | q | p ∨ q |
---|---|---|

o | o | o |

o | x | o |

x | o | o |

x | x | x |

if either p and q are true.

### Example

p: 5 is a positive number.

q: 1 + 1 = 3

Truth value of p ∨ q?

Solution q: 1 + 1 = 3

Truth value of p ∨ q?

p: ( o )

p ∧ q: ( o )

True

p ∧ q: ( o )

True

p is true.

Then p ∧ q is true.

(You don't need to find the truth value of q.)

Then p ∧ q is true.

(You don't need to find the truth value of q.)

Close

### Example

q: 1 + 1 = 3

s: 2 > 9

Truth value of q ∨ s?

Solution s: 2 > 9

Truth value of q ∨ s?

q: ( x )

s: ( x )

q ∨ s: ( x )

False

s: ( x )

q ∨ s: ( x )

False

Close

## Conditional

### Definition

p → q

[p → q] is a conditional statement.It means [if p, then q].

p: Hypothesis

q: Conclusion

### Example

Find the hypothesis and conclusion of the given statement.

If 2 is a prime number,

then 2 is an odd number.

Solution If 2 is a prime number,

then 2 is an odd number.

p

If 2 is a prime number,

then 2 is an odd number.

q

Hypothesis: 2 is a prime number.

Conclusion: 2 is an odd number.

If 2 is a prime number,

then 2 is an odd number.

q

Hypothesis: 2 is a prime number.

Conclusion: 2 is an odd number.

Close

### Example

Find the hypothesis and conclusion of the given statement.

If he is not in his room,

then he is playing basketball.

Solution If he is not in his room,

then he is playing basketball.

p

If he is not in his room,

then he is playing basketball.

q

Hypothesis: He is not in his room.

Conclusion: He is playing basketball.

If he is not in his room,

then he is playing basketball.

q

Hypothesis: He is not in his room.

Conclusion: He is playing basketball.

Close

### Example

Find the hypothesis and conclusion of the given statement.

I'm staying home if it's raining.

Solution I'm staying home if it's raining.

qp

I'm staying home if it's raining.

Hypothesis: It's raining.

Conclusion: I'm staying home.

I'm staying home if it's raining.

Hypothesis: It's raining.

Conclusion: I'm staying home.

Close

### Truth Value

p | q | p → q |
---|---|---|

o | o | o |

o | x | x |

x | o | o |

x | x | o |

### Example

p: 2 is a prime number.

q: 2 is a positive number.

Truth value of p → q?

Solution q: 2 is a positive number.

Truth value of p → q?

p: ( o )

q: ( o )

p → q: ( o )

True

q: ( o )

p → q: ( o )

True

Close

### Example

p: 2 is a prime number.

r: 2 is an odd number.

Truth value of p → r?

Solution r: 2 is an odd number.

Truth value of p → r?

p: ( o )

r: ( x )

p → r: ( x )

False

r: ( x )

p → r: ( x )

False

Close

### Example

p: 2 is a prime number.

r: 2 is an odd number.

Truth value of r → p?

Solution r: 2 is an odd number.

Truth value of r → p?

r: ( x )

r → p: ( o )

True

r → p: ( o )

True

The hypothesis r is false.

Then r → p is true.

(You don't need to find the truth value of p.)

Then r → p is true.

(You don't need to find the truth value of p.)

Close

## Inverse

### Definition

### Example

Solution

Close

p

If 2 is a prime number,

then 2 is an odd number.

q

~p → ~q: If 2 is not a prime number,

then 2 is not an odd number.

If 2 is a prime number,

then 2 is an odd number.

q

~p → ~q: If 2 is not a prime number,

then 2 is not an odd number.

Close

### Example

If he is not in his room,

then he is playing basketball.

Inverse?

Solution then he is playing basketball.

Inverse?

p

If he is not in his room,

then he is playing basketball.

q

~p → ~q: If he is in his room,

then he is not playing basketball.

If he is not in his room,

then he is playing basketball.

q

~p → ~q: If he is in his room,

then he is not playing basketball.

Close

## Converse

### Definition

q → p

To find the converse of [p → q],switch p and q.

### Example

Solution

Close

p

If 2 is a prime number,

then 2 is an odd number.

q

q → p: If 2 is an odd number,

then 2 is a prime number.

If 2 is a prime number,

then 2 is an odd number.

q

q → p: If 2 is an odd number,

then 2 is a prime number.

Close

### Example

If he is not in his room,

then he is playing basketball.

Converse?

Solution then he is playing basketball.

Converse?

p

If he is not in his room,

then he is playing basketball.

q

q → p: If he is playing basketball,

then he is not in his room.

If he is not in his room,

then he is playing basketball.

q

q → p: If he is playing basketball,

then he is not in his room.

Close

## Contrapositive

### Definition

### Example

Solution

Close

p

If 2 is a prime number,

then 2 is an odd number.

q

~q → ~p: If 2 is not an odd number,

then 2 is not a prime number.

If 2 is a prime number,

then 2 is an odd number.

q

~q → ~p: If 2 is not an odd number,

then 2 is not a prime number.

Close

### Example

If he is not in his room,

then he is playing basketball.

Contrapositive?

Solution then he is playing basketball.

Contrapositive?

p

If he is not in his room,

then he is playing basketball.

q

~q → ~p: If he is not playing basketball,

then he is in his room.

If he is not in his room,

then he is playing basketball.

q

~q → ~p: If he is not playing basketball,

then he is in his room.

Close

## Law of Contrapositive

### Law

p → q = ~q → ~p

A conditional and its contrapositivehave the same truth value.

### Relationship between Conditional, Inverse, Converse, and Contrapositive

are the contrapositive of each other.

So, by the law of contrapositive,

the inverse and the converse

also have the same truth value.

### Example

If the given statement is true,

write a statement that is always true.

If it's raining, then I'm staying home.

Solution write a statement that is always true.

If it's raining, then I'm staying home.

pq

If it's raining, then I'm staying home.

~q → ~p: If I am not staying home,

then it is not raining.

If it's raining, then I'm staying home.

~q → ~p: If I am not staying home,

then it is not raining.

[p → q] is true.

Then [~q → ~p] is true.

Then [~q → ~p] is true.

Close

### Example

If the inverse of the given statement is true,

write a statement that is always true.

If it's raining, then I'm staying home.

Solution write a statement that is always true.

If it's raining, then I'm staying home.

pq

If it's raining, then I'm staying home.

~p → ~q: ( o ) - [1]

q → p: ( o ) - [2]

If I'm staying home, then it's raining.

If it's raining, then I'm staying home.

~p → ~q: ( o ) - [1]

q → p: ( o ) - [2]

If I'm staying home, then it's raining.

[1]

The inverse [~p → ~q] is true.

[2]

Then the converse [q → p] is true.

Close

## Law of Detachment

### Law

p → q( o )

p( o )

q( o )

If [p → q] and [p] are true,p( o )

q( o )

then [q] is true.

### Example

If the given statements are all true,

write a statement that is always true.

If it's raining, then I'm staying home.

It's raining.

Solution write a statement that is always true.

If it's raining, then I'm staying home.

It's raining.

pq

If it's raining, then I'm staying home.

p

It's raining.

p → q( o )

p( o )

q( o )

I'm staying home.

If it's raining, then I'm staying home.

p

It's raining.

p → q( o )

p( o )

q( o )

I'm staying home.

Close

## Law of Syllogism

### Law

p → q( o )

q → r( o )

p → r( o )

If [p → q] is true and [q → r] is true,q → r( o )

p → r( o )

then [p → r] is true.

### Example

If the given statements are all true,

write a statement that is always true.

If it's raining, then I'm staying home.

If I'm staying home, then I'm listening to music.

Solution write a statement that is always true.

If it's raining, then I'm staying home.

If I'm staying home, then I'm listening to music.

pq

If it's raining, then I'm staying home.

qr

If I'm staying home, then I'm listening to music.

p → q( o )

q → r( o )

p → r( o )

If it's raining, then I'm listening to music.

If it's raining, then I'm staying home.

qr

If I'm staying home, then I'm listening to music.

p → q( o )

q → r( o )

p → r( o )

If it's raining, then I'm listening to music.

Close

## Biconditional

### Definition

p ↔ q

A biconditional is the conjunction of a conditional and its converse.[p → q] ∧ [q → p]

It's written and read as

[p if and only if q], [p iff. q].

### Truth Value

p → q | q → p | p ↔ q |
---|---|---|

o | o | o |

o | x | x |

x | o | x |

x | x | x |

if both [p → q] and [q → p] are true.

### Example

Solution

Close

p

If 2 is a prime number,

if and only if 2 is an even number.

q

p: ( o )

q: ( o )

p → q: ( o )

q → p: ( o ) - [1]

p ↔ q: ( o )

True

If 2 is a prime number,

if and only if 2 is an even number.

q

p: ( o )

q: ( o )

p → q: ( o )

q → p: ( o ) - [1]

p ↔ q: ( o )

True

[1]

Close

### Example

∠A is a right angle iff. m∠A = 90.

Truth value?

Solution Truth value?

pq

∠A is a right angle iff. m∠A = 90.

p → q: ( o ) - [1]

q → p: ( o ) - [2]

p ↔ q: ( o )

True

∠A is a right angle iff. m∠A = 90.

p → q: ( o ) - [1]

q → p: ( o ) - [2]

p ↔ q: ( o )

True

[1]

p → q: If ∠A is a right angle,

then m∠A = 90.

This is true.

then m∠A = 90.

This is true.

[2]

q → p: If m∠A = 90,

then ∠A is a right angle.

This is also true.

then ∠A is a right angle.

This is also true.

a biconditional can be used

to show the definition of something.

Close

### Example

x + 2 = 3 iff. x = 1.

Truth value?

Solution Truth value?

pq

x + 2 = 3 iff. x = 1.

p → q: ( o ) - [1]

q → p: ( o ) - [2]

p ↔ q: ( o )

True

x + 2 = 3 iff. x = 1.

p → q: ( o ) - [1]

q → p: ( o ) - [2]

p ↔ q: ( o )

True

[1]

p → q: If [x + 2 = 3], then [x = 1].

This is true.

This is true.

[2]

q → p: If [x = 1], then [x + 2 = 3].

This is also true.

This is also true.

a biconditional can also be used

to show the solution of an equation.

Close

### Example

x

Truth value?

Solution ^{2}= 4 iff. x = 2.Truth value?

pq

x

p → q: ( x ) - [1]

(∵ x = ±2)

q → p: ( o ) - [2]

p ↔ q: ( x )

False

x

^{2}= 4 iff. x = 2.p → q: ( x ) - [1]

(∵ x = ±2)

q → p: ( o ) - [2]

p ↔ q: ( x )

False

[1]

p → q: If [x

If [x

then [x = ±2].

(not x = 2)

So [p → q] is false.

Quadratic Equation

^{2}= 4], then [x = 2].If [x

^{2}= 4],then [x = ±2].

(not x = 2)

So [p → q] is false.

Quadratic Equation

[2]

q → p: If [x = 2], then [x

This is true.

^{2}= 4].This is true.

Close