LECTURE 1 Sets, logic & algebra review Lecture 1 Topics: § § § § Set theory A bit of logic Mathematical proofs Algebra review F F F F Numbers Rules of algebra Inequalities Intervals & absolute values § Reading: Sydsæter et al 5th ed Ch 1, Ch 2.1 to 2.7 Sydsæter et al 4th ed Ch 3.4 to 3.7, Ch 1 2 Set Theory (1.1) A set is a collection of elements or members. The set is defined by listing all its members. The elements of a set may be listed using braces { }. Example: the students enrolled in an economics degree. 𝑆 = {𝑒𝑐𝑜𝑛𝑜𝑚𝑖𝑐𝑠 𝑠𝑡𝑢𝑑𝑒𝑛𝑡𝑠} sÎS 𝑎 ∉𝑆 B is a subset of S if every element of B belong also to S. Example: female students in economics. 𝐵 = 𝑓𝑒𝑚𝑎𝑙𝑒 𝑠𝑡𝑢𝑑𝑒𝑛𝑡𝑠 𝑜𝑓 𝑒𝑐𝑜𝑛𝑜𝑚𝑖𝑐𝑠 BÌS e.g. N= {1, 2, 3, 4…..} set of natural numbers 3 Notation § aÎA a is an element of set A § bÏA b is not an element of set A § AÌB A is a proper subset of B if all the elements of A are contained in B but B has at least one element not in A. § AÍB A is a (weak) subset of B, all the elements of A are contained in B but it may also be the case that A and B are equal. (not commonly used) § { } or Ø a set with no elements is the empty set or null set 4 More notation § sets may be described by their defining property e.g. {x: x Ì N and x > 7} F read "the set of x such that x is a natural number and x is greater than 7" § A Ç B the intersection of two sets A and B: elements that belong to both A and B or {x:xÎA and xÎB} § disjoint sets have no elements in common (mutually exclusive) i.e. AÇB=Æ 5 § A È B The union of two sets A and B: contains elements that belong to at least one of the sets A or B or both B B {x: xÎA or xÎB} A § A\B A minus B: the elements that belong to A but not B A Ç B' B A 6 § universal set W § complement of A is all the elements that are not in A notation A' , CA or Ω\A or ! A or A A' A Venn diagrams become unmanageable with more than 3 sets. 7 Set Operations (summary) (1.1) Notation Name Set definition AÈ B A Union B The elements belong to A or B AÇ B A intersection B Elements must belong to both A and B A minus B Elements belong to A but not to B A\ B Another way of defining these operations is as follow: A È B = {x : x Î A or x Î B} A Ç B = {x : x Î A and x Î B} A \ B = {x : x Î A and x Ï B} 8 Example 1 § Let A={2,3,4}, B={2,5,6}, C={5,6,2}, D={6}. Which of the following statements is true? 4 Î C, 5 Î C A Ì B, D Ì C B = C, A=B Find the following sets: A Ç B, AÈ B A \ B, B \ A ( A È B) \ ( A Ç B) 9 Example 2 Let sets of UQ students be identified as F = female students; B = biology students; E = economics students; T = tennis players; describe in words: 1. 2. 3. 4. W\T FÇB BÈE F\(EÈB) 10 Other important notions about sets: Convex sets A set is convex if a for every pair of points within the set, every point on the straight line segment that joins the pair of points is also within the set. Convex sets Non-Convex sets 11 A few aspects of logic (1.2) Solve the following equation: "Solution": ( x + 2 )2 = ( 4 - x ) 2 x+2 = 4- x After checking, we see that the “solution” is incorrect. x2 + 4x + 4 = 4 - x x2 + 5x = 0 x+5 = 0 x = -5 Some points of logical reasoning are useful at this time. If x = -5 LHS = x + 2 = -3 RHS = 4 - x = 3 x+2 ¹ 4- x 12 Proposition Propositions are usually represented with capital letters: P, Q, etc. and can be true or false Examples: P = “all individuals who breathe are alive”; (T) Q = “all individuals who breathe are healthy”. (F) § Implication arrow: P Þ Q P implies Q x is a square Þ x is a rectangle; x > 2 Þ x2 > 4 § Equivalence arrow: P Û Q P and Q are logically equivalent if P Þ Q and Q Þ P then P Û Q 13 Necessary and sufficient conditions PÞQ F P implies Q, or ‘if P then Q’, or ‘Q if P’ or ‘P only if Q’ F P is a sufficient condition for Q F also Q is a necessary condition for P A sufficient condition for x to be a rectangle is that x is a square. A necessary condition for x to be a square is that x is a rectangle. PÛQ F P is equivalent to Q , or ‘P iff Q’ F P is a necessary and sufficient condition for Q Solving equations involves a sequence of equivalences and implications. 14 Necessary and sufficient conditions A necessary condition is a prerequisite. Suppose statement P is true only if another statement Q is true; then Q is a necessary condition for P. P Þ Q reads: “P only if Q”; “P implies Q”; “if P then Q”; “Q if P”. It may be that P Þ W at the same time. Then both Q and W are necessary conditions. Example: Let P be the statement “a person is an aunt” and Q be the statement “a person is female”, then P Þ Q . A person can be an aunt only if she is a female, to be a female is a necessary condition to be an aunt. The converse is not true. 15 Necessary and sufficient conditions A sufficient condition occurs when statement Q is true if P is true, but Q can also be true when P is not true. The truth of P is sufficient to establish the truth of Q, but is not a necessary condition for Q. Given P Þ Q , then P is a sufficient condition for Q. “P implies Q”; “if P then Q”; “Q if P” Example: Let P be the statement “one takes a plane to Europe” and Q be the statement “one can travel to Europe”, then P is a sufficient condition for Q. But sea travel is also available so we cannot say Q Þ P . 16 Necessary and sufficient conditions A condition Q can be both necessary and sufficient for P. P Û Q which reads “P if and only if Q” or “P iff Q” P implies Q but Q also implies P. Example: Let P be the statement “there are less than 30 days in the month” and Q “the month is February”, then P ÛQ. P only if Q, conversely Q only if P. Q is a necessary and sufficient condition for P. 17 Mathematical proofs (1.3) In mathematics results are stated as Theorems – the most important results, and Lemmas – subsidiary results that support theorems Theorems are formulated as implications: PÞQ where P is a series of propositions, the premises, and Q the conclusions. 18 Mathematical proofs (1.3) 1. direct proof or deduction: F every statement follows logically from the previous one F PÞQ 2. indirect proof or by contradiction: F assume proposition false F derive implications from this and show they contradict some proven fact F not Q Þ not P 3. mathematical induction F Argue from the specific to the general F Not accepted as formal proofs 19 Example 3 if –x2 + 5x – 4 > 0 prove that x must be a positive value by indirect proof, § assume x £ 0 § then 5x £ 0 § and –x2 + 5x – 4 is the sum of three negative terms so is less than 0 and so contradicts the proposition § hence solution for x must be a positive value by direct proof Suppose - x2 + 5x - 4 > 0 (add x 2 + 4) Û 5x > x2 + 4 x 2 + 4 ³ 4 for all x Þ 5x > 4 4 Û x> 5 20 Proofs by mathematical induction (1.4) We have a statement of the form: Proposition: A(n) holds for all natural numbers “n” Proof: 1. Check that A(1) is true 2. Assume that A(k) is true 3. Check that A(k+1) is true 4. If so, then A(n) is true for all natural numbers n. 21 Example 4 Prove by induction that the sum of n integers is n(n + 1) Sn = å x = 2 1 n Check that it is true for n = 1 (or 2 or 3) Assume true for n = k or Sk= ½k(k+1) Then show that it is also true for n = k+1 S k +1 = 1 2 k ( k + 1) + ( k + 1) = k (k + 1) 2(k + 1) (k + 1)(k + 2) + = 2 2 2 i.e. true for (k+1) 22 Numbers Natural Numbers “N ” Integers “Z ” Fractions Irrationals “I ” Rationals “Q ” Real Numbers “R” Complex/Imaginary Numbers “C ” -1 Numbers -5 ! 23 Algebra Review: Real Numbers (2.1) N § Natural numbers: 1, 2, 3, 4, ... F Odd numbers: 1, 3, 5, 7, ... F Even numbers: 2, 4, 6, 8, ... (multiples of 2). § Integer numbers: ..., -3, -2, -1, 0, 1, 2, 3, .... (a more compact notation is: 0, ±1, ± 2, ± 3, ... Z The Number Line -¥ … -3 -2 -1 0 1 2 3 … +¥ 24 Algebra Review: Real Numbers § Rational Numbers: the ratio of two integer numbers. Q F Let’s call a and b two generic integer numbers; F The ratio a/b is a rational number. F b must be different from zero: a/0 is not defined. § Rational numbers can be represented using the decimal system: 1/2 = 0.5 (finite decimal fraction) 1/3 = 0.33333... (infinite decimal fraction, or recurring or periodic) F Every rational number can be represented as a decimal fraction which is periodic after a finite number of digits: 11/70 = 0.1 571428 571428 571428... 25 Algebra Review: Real Numbers § Rational numbers do not “fill” the number line! 1/4 0 1/3 1/2 1 F There is an infinite number of rational numbers between two integers, but the number line is still almost “empty”. 26 Algebra Review: Irrational & Real Numbers Irrational numbers: I an infinite decimal fraction (nonperiodical) is an irrational number. a Irrationals: Cannot be expressed as where a, b are integers. b 2 = 1.414213562373.... The set of rational numbers complemented with the set of irrational numbers give rise to the set of Real Numbers. R Real Numbers fill the numbers line. The square root of a negative real is not a real number (we need complex numbers... but not in this course). 27 Algebra Review: Real Numbers Textbook says the proof of 2 ¹ a b is due to Euclid (300BC). Legend says it was proved by a Pythagorean (probably Hippasus of Metapontum) 1 1 2 Hippasus’ proof was a proof by contradiction. 28 How the Greek’s did maths 5 4 3 Pythagoras's theorem a 2 + b 2 = c2 29 The legend (from wikipedia): 2¹a b The first proof of the existence of irrational numbers is usually attributed to a Pythagorean (possibly Hippasus of Metapontum), who probably discovered them while identifying sides of the pentagram. The then-current Pythagorean method would have claimed that there must be some sufficiently small, indivisible unit that could fit evenly into one of these lengths as well as the other. However, Hippasus, in the 5th century BC, was able to deduce that there was in fact no common unit of measure, and that the assertion of such an existence was in fact a contradiction. Hippasus, however, was not lauded for his efforts: according to one legend, he made his discovery while out at sea, and was subsequently thrown overboard by his fellow Pythagoreans “…for having produced an element in the universe which denied the…doctrine that all phenomena in the universe can be reduced to whole numbers and their ratios.” Another legend states that Hippasus was merely exiled for this revelation. Whatever the consequence to Hippasus himself, his discovery posed a very serious problem to Pythagorean mathematics, since it shattered the assumption that number and geometry were inseparable–a foundation of their theory. 30 Closure A set has closure under an operation if performance of that operation on members of the set always produces a member of the same set. § The set of natural numbers is closed with respect to sum. § Integer numbers are closed with respect to multiplication but not division. § Rational numbers are a closed set with respect to division but are not closed with respect to square root (and other powers) § Real Numbers are closed with respect to: sum, subtraction, multiplication, division and powers of positive reals 31 Algebra review: Basic Arithmetic Operations + / * 32 Always result in Real Numbers With the exception: P : undefined for any P ÎÂ 0 Algebra review: Integer powers (2.2) The n-times product of a real number can be represented as an integer power: 3 × 3 × 3 × 3 = 34 a$× !# a × a ×!" ... × a = a n -times Rules of powers: n a = base n = exponent n an æaö ç ÷ = n b èbø a0 = 1 a -n 1 = n a 00 = undefined 33 Algebra review: Integer powers (2.2) Rules of powers: ar a s = a r + s ar r -s r -s = a a = a as r r (ab )r = ab × ab × ... × ab = a × a × ... × a × b × b × ... × b = a b $!# ! !" ! $!#! " $ !#! " r -times r -times r -times Wrong rules of powers: (a + b ) ¹ a n + b n (2 + 1)2 = 9 ¹ 22 + 12 = 5 n 34 Rules of Algebra (2.3) § commutative law § a+b = b+a ab = ba § associative law § (a+b)+c = a+(b+c) a(bc) = (ab)c § distributive law § a(b+c) = ab + ac (a+b)c = ac + bc 35 Rules of Algebra a+0=a a + (-a) = 0 1.a = a aa -1 = 1 for a ¹ 0 (-a)b = a(- b) = - ab (-a)(- b) = ab 36 Rules of Algebra Some more important ones: “quadratic identities” (a + b )2 = a 2 + b 2 + 2ab (a - b )2 = a 2 + b 2 - 2ab (a - b)(a + b) = a 2 - b2 37 Fractions: Rules for Operations (2.4) a.c a = b.c b (b¹0, c ¹ 0) -a ( -a )( -1) a = = -b ( -b )( -1) b a a ( -1) a -a - = ( -1) = = b b b b a b a +b + = c c c b a.c + b a+ = c c a c ad + bc + = b d bd b a.b a. = c c a c a.c . = b d b.d a a c ÷ = b c b d d = ad bc 38 Algebra review: Fractional Power (2.5) A fractional power has a rational number as exponent. In general: a1 n = n a a p q q = a = p a1 n is the exponential form, n ( a) q p a is the radical form Note: a = a1 2 is the square root of a and is defined as the nonnegative number that multiplied by itself gives a. 39 Rules for Fractional Powers ab = for a ³ 0, a b also ab = ( ab )1 2 = a1 2b1 2 a b a for a ³ 0, b > 0 b = 12 also a æaö =ç ÷ b èbø a+b ¹ 40 = a1 2b -1 2 a + b b ³0 Algebra review: Inequalities (2.6) § A strictly positive (negative) number is written as: a>0 ( a < 0) § We say a is bigger than b if their difference is positive § We say a is smaller than b if their difference is negative § A weakly positive (negative) number is written as: a³0 a is weakly positive/non-negative ( a £ 0) 41 Î "is an element of" Inequalities § > means 'is greater than'; < ‘is less than’ § a < b on number line a is to left of b § > & < strict inequalities; § £ & ³ weak inequalities § if two sides of an inequality are multiplied by a negative number, the direction is reversed § inverting an inequality reverses the direction Examples § x>2 § 5³x § 5 £ x £ 10 x Î [5, 10] closed interval § 5 < x < 10 x Î (5, 10) open interval § if x < b -x > -b § if 0 < x < b then 1 1 > x b 42 Inequalities & Sign Diagrams (2.6) Example 5: Use a sign diagram to find when the inequality (x - 1)(3 - x) > 0 holds. -3 -2 -1 0 1 2 3 4 5 x -1 3-x (x -1)(3 – x) Answer: (x - 1)(3 - x) > 0 iff 1 < x < 3 43 Inequalities & Sign Diagrams Example 6 Use a sign diagram determine when the following inequality holds: 2p -3 > 3- p p -1 44 Intervals (2.7) Let a and b be any two numbers on the real line. Then we call all the numbers that lie between these two numbers an interval. Notation Name All x such that: (a,b) Open interval a< x<b [a, b] Closed interval a£ x£b (a,b] Half open interval a< x£b [a,b) Half open interval a£ x<b 45 Absolute Values (2.7) For any real number, its absolute value is defined as the distance from the origin: ìa if a ³ 0 a =í î- a if a < 0 |x| < b |x| > b means -b < x < b x > b and x < -b 46 Next Week … § Summation notation § Solving equations 47