You are on page 1of 82

DIPLOMA MODULE 1

UNIT/SUBJECT:
COMPUTATIONAL MATHEMATICS

Mr. Amos Mising’a ict and liberal studies department 1|Page


DEPT: ICT AND LIBERAL STUDIES
COURSE: INFORMATION COMMUNICATION TECHNOLOGY
LECTURER: AMOS MISING‘A
COURSE OUTLINE
MAJOR TOPIC CONTENT METHODOLOGY
Introduction to  Algebra Classroom based teaching
computational o Quadratic equations
mathematics o Simultaneous equations
o Linear equations with 3
unknowns
o Definition of matrices
o Matrix operation
o Application of matrices
Number systems and  Number systems Classroom based teaching
binary arithmetics o Decimal
o Binary
o Octal
o Hexadecimal
 Binary operation
Binary codes  BCD Classroom based teaching
 GRAY
 Alphanumeric code
Logic gates and Boolean  AND Classroom based teaching
algebra  OR
 Inverter
 Boolean algebra
 NAND
 NOR
 Implementation
 Exclusive OR
 Exclusive NOR
Discrete counting  Fundamental principals Classroom based teaching
 Permutation and combinations
 Binomial expansion
Graphs and function  Continuous functions Classroom based teaching
(interpolations and
extrapolations)
 Graphs of functions
 Areas under a curve
 Errors in graphs
 In-equalities
Numerical analysis  Iterative method Classroom based teaching
 Approximation

Mr. Amos Mising’a ict and liberal studies department 2|Page


 Errors
 Linear interpolation and
extrapolation
 Finite differences
Data collection  Basic for data collection Classroom based teaching
representation  Data classification
 Data tabulation
 Data presentation
Measure of central  Definition of measures Classroom based teaching
tendency  Properties
 Calculation and calculation
 Interpretation
Measures of dispersion  Characteristics Classroom based teaching
 Relative and absolute measure
 Measures calculation and
interpretation
Elements of probability  Modelling Classroom based teaching
 Scale
 Space
 Multiple probabilities
 Conditional
 Probabilities
 Probability trees
Introduction to  Symbolic models Classroom based teaching
modelling  Laws of modelling
 Generalizing models
 Spartial models
 Logical models
 Statistical

Mr. Amos Mising’a ict and liberal studies department 3|Page


TOPIC 1

NUMBER SYSTEM AND BINARY ARITHMETIC


Content:
 Number system
 Decimals
 Binary
 Octal
 hexadecimal
 Binary arithmetic

Number system
- Is a set of symbols used to represent values derived from a common base or radix.
- Base refers to the maximum possible number of different digit used in a given system.
- Number systems can be classified into four possible major categories.
1. Decimal number system ( e.g X10)
2. Binary number system ( e.g X2)
3. Octal number system ( e.g X8)
4. Hexadecimal number system ( e.g X16)

1. DECIMAL NUMBER SYSTEM ( E.G X10)


- Decimal numbers system has ten digit ranging from 0 – 9 i.e 0,1,2,3,4,5,6,7,8,9
- Its also called base ten number system or denary number system
- Its always written as subscript 10 e.g X10
Example
i) 7458
Solution
- Identify the positions of every digit starting with zero.
73425180
= 7×103 +4×102+5×101+8×100
=700+400+50+8
=7458

ii) 321.62
Solution
- Identify the positions of every digit starting with zero.
=3×102+2×101×1×100+6×10-1×2×10-2
=300+20+1+0.6+0.02
=321.62

2. BINARY NUMBER SYSTEM ( E.G X2)

Mr. Amos Mising’a ict and liberal studies department 4|Page


- It uses two digits namely “1” and ―0” to represent numbers
- Binary numbers are written as X2

Example
- Change the following binary number to decimal number system
(i) 10112
Solution
10112 = N10
- Identify the position of every bit, then
= 1×23+0×22+1×21+1×20
=8+0+2+1
=1110

(ii) 11012
Solution
11012 = k10
- Identify the position of every bit, then
= 1×23+1×22+0×21+1×20
=8+4+0+1
=1310

(iii) 11001.10012
Solution
11001.10012 = k10
- Identify the position of every bit, then
= 1×24+1×23+0×22+0×21+0×20+ . 1×2-1+0×2-2+0×2-3+1×2-4
=16+8+0+0+1+0.5+0.25+0.0625
=25.812510

3. OCTAL NUMBER SYSTEMS (N8)


- It uses eight digit from 0 – 7 representing values of numbers.
- e.g 72458

Mr. Amos Mising’a ict and liberal studies department 5|Page


Example
- convert the following octal number to decimal number system
(i) 72458
Solution
(i) 72458 = N10
- Identify the position of every bit, then
= 7×83+2×82+4×8×1+5×80
=3584+128+32+5
=374910

(ii) 8458 = N10


Solution

4. HEXADECIMAL NUMBER SYSTEMS (N16)


- This is a number system with radix of 16
- The digit ranges from 0 – 9 and letter A – F

Base10 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Base 16 0 1 2 3 4 5 6 7 8 9 A B C D E F

Example
Convert the following number system to decimal number system
(i) 94B16
Solution
94B16 = N10
- Identify the position of every bit, then
= 9×162+4×161+11×160
=2304+64+11
=237910

(ii) 52D16
Solution
52D16 = N10
- Identify the position of every bit, then

Mr. Amos Mising’a ict and liberal studies department 6|Page


= 5×162+2×161+13×160
=1280+32+13
=449310
Reasons for using octal and hexadecimal number systems
(i) A single octal or hexadecimal digit encodes more than one binary digit. This
automatic data compression hence storage medium can save on space.
(ii) Instead of transmitting long digits of zeros (0) and ones (1) between devices, the
data can be encoded as octal or hexadecimal to improve transmission efficiency.

Assignment
Converting binary numbers to decimal number
i) 1011012
ii) 11.110112
iii) 01012
iv) 11112
v) 10110012

Converting decimal number to binary numbers

Example (ii) 23110


(i) 4510 Solution
Solution 2 231 remainder
2 45 remainder 2 115 1
2 22 1 2 57 1
2 11 0 2 28 1
2 5 1 2 14 0
2 2 1 2 7 0
2 1 0 2 3 1
2 0 1 2 1 1
Read from 2 0 1
below Read
Answer 4510 = 1011012 from below
Answer 23110 = 111001112

(iii) 7.562510 Read from top


Solution
2 7 remainder
2 3 1 0.5625 ×2 = 1.125
2 1 1
2 0 1 0.125 ×2 = 0.250
Read from 0.250 ×2 = 0.500
below
0.500 ×2 =1.000

Mr. Amos Mising’a ict and liberal studies department 7|Page


Answer 7.562510 = 111.10012
Exercise
Convert the following decimal number to binary number system
i) 8.32510
ii) 6.73910

Converting octal numbers to binary number system


Because the maximum octal number is seven (7), it can be represented with maximum of
three (3) digits.
Example / table 1
Octal Binary equivalent
0 000
2 001
3 010
4 011
5 100
6 101
7 111

Exercise
Convert the following numbers to its binary equivalent.
(i) 3218
(ii) 5268
(iii) 5708
(iv) 8428
Solutions
(i) 3218
Octal 3 2 1
Binary
011 010 001
equivalent

Answer 3218 =011 010 0012

Solutions
(ii) 5268
Octal 5 2 6
Binary 101 010 110
equivalent

Answer 5268 =101 010 1102

Mr. Amos Mising’a ict and liberal studies department 8|Page


Solutions
(iii) 5708
Octal 5 7
Binary 101 111 000
equivalent

Answer 5708 =101 111 0002


Solutions
(iv) 6428
Octal 6 4 2
Binary 110 100 010
equivalent

Answer 6428 =110 100 0102


Converting binary number to hexadecimal number
- Group the digits of binary number into 4 groups starting from right to left.
- write the hexadecimal equivalent of each group

Hexa
deci 0 1 2 3 4 5 6 7 8 9 A B C D E F
mal
Deci
mal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
No.
Bina 00 00 00 00 01 01 01 01 10 10 10 10 11 11 11 11
ry 00 01 10 11 00 01 10 11 00 01 10 11 00 01 10 11

1. Convert the following binary numbers into hexadecimal number systems


(i) 110100012

Solution
Binary = 1101 0001
Hexadecimal = D 1
Answer 110100012 = D116

Exercise
(ii) 110101112
(iii) 110110012
(iv) 100100012

2. Convert the following hexadecimal number into decimal numbers.


(i) 32116
(ii) EFE16

Mr. Amos Mising’a ict and liberal studies department 9|Page


(iii) 11ABDF16
(iv) CDFF3116
(v) EFD16

Solutions
1. 32116
Hexadecimal 3 2 1
Binary 0011 0010 0001

‫ ؞‬32116 = 0011001000012

Mr. Amos Mising’a ict and liberal studies department 10 | P a g e


TOPIC 2
BINARY CODED
Content:
 BCD
 Gray Code
 Alphanumeric code

SYMBOLIC REPRESENTATION USING CODING SCHEME


The most common coding scheme are;
1. Binary Coded Decimal (BCD)
2. Extended Binary Coded Decimal Interchange Code (EBCDIC)
3. American Standard Code For Information Interchange (ASCII)

BINARY CODED DECIMAL (BCD)


 Is a 4 bit code used to represent numeric data only
 E.g number like 9 can be represented using BCD as 10012
 BCD is mostly used in simple electronic devices like calculator and microwaves
 It makes work easier to process and display individual numbers on their liquid crystal
display (LCD) screen
 Standard BCD uses 6 bit code allowing up to 64 characters to be represented.

EXTENDED BINARY CODED DECIMAL INTERCHANGE CODE (EBCDIC)


 Is a 8 bit character coding scheme
 It‘s used primarily on IBC computer
 A total of 256 (28) character can be coded using this scheme.

AMERICAN STANDARD CODE FOR INFORMATION INTERCHANGE (ASCII)


 Is a 7 bit code
 Only 128 character i.e 27 can be represented
 However manufacturers have added an eight bit to this coding scheme
BINARY ARITHMETIC OPERATION
The 4 basic arithmetic operation applied on number are
1. Addition
2. Subtraction
3. Multiplication
4. Division
 The process of performing binary subtraction is called complementation.
 For multiplication and division, the arithmetic and logic unit uses method called
shifting be adding the bits
REPRESENTATION OF SIGNED BINARY NUMBERS

Mr. Amos Mising’a ict and liberal studies department 11 | P a g e


The 3 common ways of representing a signed binary number (positive or negative)
1. Prefixing an extra sign bit to a binary number
2. Using one‘s complement
3. Using two‘s complement

Prefixing an extra sign bit to a binary number


 The +ve or –ve a signed to a number e.g +2710 or -2710 i.e in decimal
 127 = 11111112
 To indicate that is +ve we add an extra bit 0 i.e (0) 11111112
 To indicate that is -ve we add an extra bit 1 i.e (1) 11111112

Using one’s complement

 Complement refers to apart, when put together make a whole.


 In complement, zeros (0‘s) are negated to ones (1‘s) while ones (1‘s) are negated to
zero (0‘s)
 The complement is also known as bitwise Not.
Example
(i) 11002
Answer = 00112
(ii) 10102
Answer = 01012
(iii) 001011012
(iv) Answer = 110100102

Using twos complement.


Advantages of using this method
 There are no two ways of representing a zero as the case with the other two methods
 Effective addition and subtraction can be done even with numbers that are represented
with a sign bit without a need for extra circuities to examine the sign of an operand.

Rules/steps
 To get twos‘ complement of a decimal number e.g 4510
 Convert it to its binary equivalent, then;
 Ensure that the binary is grouped into 4 bit i.e 4,8,12,…
 Find ones‘ complement
 Add one (1) from the right to the ones‘ complement

Example
Find twos’ complement of the following numbers

Mr. Amos Mising’a ict and liberal studies department 12 | P a g e


(i) 4510
Solution
2 45 R
2 22 1
2 11 0
2 5 1
2 2 1
2 1 0
2 0 1

4510 =001011012
Change the binary into ones’ complement
Binary = 001011012
Ones’ complement = 110100102
Twos’ complement = 11010010
+ 1
Twos’ complement = 110100112
Questions
(i) Using 8 bit, find the ones’ complement of 1310
(ii) Using 8 bit notation, find the twos’ complement of 2010

Binary addition and subtraction


(i) 1112 + 0112 =10102
(ii) 001102 + 011012 =100112
(iii) 101102 + 10112+1112 =1010002
(iv) 11012 - 10102 =112
(v) 101012 - 1102 =1112
(vi) 100112 - 11002 =01112
Assignment
1. Using 8 bit, find twos’ complement of 152 + 82 in binary form
2. Using 8 bit, find twos’ complement of 272 + 52 in binary form
Note
 Change the decimal number into binary equivalent
 The decimal number on the right i.e 82 change it to ones‘ complement
 Change it again to twos‘ complement
 Then add the two numbers

Answers i
Decimal number 152 = Binary 000011112
Decimal number 82 = Binary 000010002
 Change 82 = Binary 000010002
= Ones‘ complement 111101112
= Twos‘ complement (111101112+1) = 111110002
 Then add the two numbers i.e
000011112 + 111110002 = (1) 0000 01112
= 01112

Mr. Amos Mising’a ict and liberal studies department 13 | P a g e


Answers ii
= (1) 0001 01102
= 101102

GRAY CODE
Find the gray code of 010012
Answer
01001 add them in pairs
ꓦꓦ ꓦ ꓦ
01101 gray code

Excess -3
From the previous numbering system in 4 bit, 3 = (0011).
There excess – 3 is (0011).
example
Convert the following hexadecimal numbers to excess -3
a) 6AD16
b) 62510
c) 34B10

(i) Answers
Hexadecimal binary
6 0110
A 1010
D 1101
Then add excess-3 i.e (0011)
6 A D
0110 1010 1101
0011 0011 0011 +
1001 1101 10000
Answer 6ADH = 10011101100002
(ii) Answer

Questions

Mr. Amos Mising’a ict and liberal studies department 14 | P a g e


1. Define the following terms as used in number systems giving applicable examples
i) Bit
ii) Word
iii) Kilobyte
iv) Megabyte
v) Gigabyte

Mr. Amos Mising’a ict and liberal studies department 15 | P a g e


TOPIC 3

DISCRETE COUNTING
Content:
 Fundamental principal
 Permutation and combinations
 Binomial expansion

Binomial expansion of upto power four


Expand
(i) (a + b)2
Answer = (a+b) (a+b)
= axa + axb + bxa + bxb
= a2+ab+ba+b2
= a2+2ba+b2
3
(ii) (a + b)
Answer = (a+b) (a+b) (a+b)
= (a2+2ba+b2) (a+b)
= a3+2a2b+ab2+ a2b+2ab2+b3
= a3+3a2b+3ab2+b3
(iii) (a + b)4

Pascal’s triangle
Expression Expansion Coefficient
(a + b)2 a2+2ba+b2 1 2 1
(a + b)3 a3+3a2b+3ab2+b3 1 3 3 1
(a + b)4 a4+4a3b+6a2b2+4ab3+b4 1 4 6 4 1

The table below shows the coefficients of the expansion of (a + b)n for n = 0,1,2,…7
Expression coefficient
(a + b)0 1
(a + b)1 11
(a + b)2 121
(a + b)3 1331
(a + b)4 14641
(a + b)5 1 5 10 10 5 1
(a + b)6 1 6 15 20 15 6 1
(a + b)7 1 7 21 35 35 21 7 1
(a + b)8 1 8 28 56 70 56 28 8 1
(a + b)9 1 9 36 84 126 126 84 36 9 1

The coefficient of the expansion form a pattern called pascal’s triangle.

Mr. Amos Mising’a ict and liberal studies department 16 | P a g e


Note. The sum of the pattern of a and b in each term is equal
 As power of a descends the power of b ascends
Example 1
Expand (p+q)5
Answer
= p5, p4q1, p3q2, p2q3, p1q4, q5
= coefficient 1, 5,10,10,5,1
= 1 p5+5 p4q1+10 p3q2+10p2q3+5p1q4+1q5
(p+q) 5 = p5+5p4q1+10 p3q2+10p2q3+5p1q4+q5

Assignment
Use pascal’s triangle to expand
(i) (m+n)6
(ii) (x + y)9
(iii) (m+n)10

Example 2
Expand (c+4)5
Answer
= c5, c441, c342, c243, c144, 45
= c5, c44, c316, c264, c1256, 1024
= coefficient 1, 5,10,10,5,1
= 1xc5+5x4c4+10x16 c3+10x64 c2+5x256 c1+1x 1024
= c5+20c4+160 c3+640 c2+1280 c1+1024
Example 3
Expand (2x+3y) 4
Answer
= (2x) 4, (2x) 3(3y) 1, (2x) 2(3y) 2, (2x) 1(3y) 3, (3y) 4
= 16x4 +24x3y1+36x2y2+54x1y3+81y4
= coefficient 1, 4,6,4,1
= 1x16x4 +4x24x3y1+6x36x2y2+4x54x1y3+1x81y4
= 16x4 +96x3y1+216x2y2+216x1y3+81y4

Mr. Amos Mising’a ict and liberal studies department 17 | P a g e


Exercise
Expand
1. (x-y)7
2. (x+z)6
3. (x-4y)3
4. (b-c)6
5. (3x+1/3)4

Application to numerical cases


Example: 1
1. Use binomial expansion to evaluate (1.02)6 to 4 s.f
Solution
1.02 = (1+0.02)
‫( ؞‬1.02)6 = (1+0.02)6
= 16,15 0.021, 14 0.022, 13 0.022, 12 0.024, 11 0.025,0.026
Coefficient = 1,6,15,20,15,6,1
=1x16+6x15x 0.021+15x14 x0.022+20x 13 x0.022+15x 12x 0.024+6x 11
x0.025+0.026
=1+0.12+0.0060+0.00016+0.0000024+0.0000000192+0.000000000024
= 1.1261624
= 1.126(4s.f)

Example: 2
2. Expand (1+x)9 up to the term in x3 .use the expansion to estimate (0.98)9 correct to 3
decimal place.
Solution
(1+x) = 19,18 x1, 17 x2, 16 x3, 15 x3, 14 x4, 13 x5, 12 x6, 11 x7, x8
= 1, 9, 36, 84, 126, 84, 36, 9, 1
= 1+9x+36x2 +84x3 +…
(1+x)9 = 1+9x+36x2 +84x3 +…
Again ;
(0.98)9 = (1+x)9
0.98 = 1+x

Mr. Amos Mising’a ict and liberal studies department 18 | P a g e


X = 0.98 – 1
X = - 0.02
Therefore (0.98)9 = 1+9(- 0.02)1 + 36(- 0.02)2+84(- 0.02)3
= 1 - 0.18 +0.0144 – 0.000672
= 0.833728
= 0.834(3 decimal place)

Example: 3
Expand (1 + ½ x) 10 up to the the term in x3 in ascending power of x. Hence, find the value of
(0.05)10 correct to four decimal places.
Solution
(1 + ½ x) 10 = 1+10(½ x)1 +45(½ x)2 +120(½ x)3 +…
= 1+5x + 45/4 x2+ 15x3
(1 + ½ x) 10= (0.05)10
1+ ½ x = 0.05
½ x = 0.05-1
½x = - 0.95
X = - 0.95x2
X = - 1.95
Therefore
=1+5x + 45/4 x2+ 15x3
=1+5(- 1.95) + 45/4 (- 1.95)2+ 15(- 1.95)3
= 1- 9.75 + 42.778125

Assignment
1. Use binomial expansion to evaluate each of the following, correct to to 4 decimal places.
i) (1.02)5
ii) (1.003)3
iii) (0.96)4
iv) (0.97)4
2. use binomial expansion to evaluate to the 4th term to estimate each of the following to 4
decimal place
a. (1.005)10
b. (1.01)9
c. (0.99)8

Mr. Amos Mising’a ict and liberal studies department 19 | P a g e


3. Expand (a – b)5. Hence find the value of (0.96)5, correct to 3 decimal places
4. Expand (2 + 3x)6 up to the term in x4 . Hence estimate (1.91)6 correct to 4 decimal place.

- Permutation and combination

SET THEORY
Subtopic:
 Terminology
 Properties of set
 Set operation
 Venn diagram
 Application
What is a set?
- A set is a clearly defined collection of object/number/element(s)
- The member of a set may be defined by:-
a) Listing them down
b) Describing them carefully in words
- It is usual to enclose the list of numbers in curly bracket i.e { }
Example
i)
ii)
ALGEBRAIC OF SET

1. INTERSECTION
- Given two sets A and B, the sets consisting of those numbers which belong to both A and
B is called intersection of A and B , written as hence

Example 1
if A and B has :

Solution
Then
Example 2
If and what is the intersection of A and B

Mr. Amos Mising’a ict and liberal studies department 20 | P a g e


Solution

2. UNION
This is a set with numbers belonging in both sides.

Example 1
and
Solution

Example 2
and
Solution

VENN DIAGRAM
- Venn diagram is set to represent sets. Here, the set is shown using a circle. In a
venn diagrams, sets are usually represented using circles.
- The universal set is the rectangle. The set A is a subset of the universal set and so it is
within the rectangle.

- The complement of is written as A1, contains all events in the sample space which
are not members of A. A and A1 together cover possible eventuality.

A1

Mr. Amos Mising’a ict and liberal studies department 21 | P a g e


- A and B i.e means of sets and contains all of the elements of both A and
B. this can be represented on a venn diagram as follows

- it means the of set A and B. this contains all of the elements which
are both A and B. is shown on the Venn diagram

EMPTY SET/ NULL


Given set of odd numbers e.g
set of multiple numbers e.g
Then i.e empty set

UNIVERSAL SET AND COMPLEMENT SET


- Universal set is one which for all elements which are involved in a particular occasion are
stated
Example

A1 or Ac = complement numbers which are missing in a set


Ac
Work out
Ac
Ac

SUB-SET (⊂ or ⊂)
- Set whose number are all included in another set.
- Set can be sub-set of its self e.g

A⊂A
Example
Given that and then H is a subset of K i.e ⊂

Mr. Amos Mising’a ict and liberal studies department 22 | P a g e


NUMBER OF ELEMENT IN A SET
- The notation is used to indicate the number of element in a set
Example
Given set

Determine answers
i)
ii)
iii)
iv)
v)
vi)
Hence verify

Solution

SUBTRACTION OF SETS
Example A-B or A\B
{a,b,c} – {a,c,e}
Solution
Note :We are subtracting the 2nd set from 1st set
Ans= {b}
If you have two sets A and B, the difference A-B is set
A-B={x∈A:x B}
Also note that
{1,2,3,4,5}-{2,6}
Solution
Ans ={1,3,4,5}

ADDITION SET
- Usually A+B is called minkowski sum donated the sums of an element of A and an
element of B
{1,2} + {1,2,4}

Mr. Amos Mising’a ict and liberal studies department 23 | P a g e


Solution
Ans= {1+1,1+2,1+4,2+1,2+2,2+4}
= {2,3,5,3,4,6}
= {2,3,4,5,6}
- A U B means that the unions the union with the common element removed
{1,2} U {1,4,5}={1,2,4,5}.

Assignment knec nov 2017


1. Given two sets, k={1,2,3} and L={1,3,6,5} , determine K-L (2 mks)

Solution
{1,2,3}-{1,3,6,5} = {2}
2. Distinguish between a finite set and an infinite set as used in set theory (2 mks)
Solution
Finite set-
 a set is said to be finite if its elements are countable e.g p={5,10,15,20,25,30}and
n(p)=6
Infinite set-
 is a set whose elements cannot be listed i.e uncountable e.g N={1,2,3,…} i.e set of
all natural numbers is an infinite set

Assignment
1. Given that ={m,o,p,w,k,a,t}; if A={m.o.p.w.k} and B={k,a,t). Determine each of the
following
Solutions answers
c c
i) A A
c
ii) B Bc
iii)
2. A researcher carried out a survey a bout car and motorbike ownership on 500 university
students. It was found out that 123 students own motorbikes 91 own cars while 29 own
both.
i. Draw avenn diagram to represent this information (3 mks)
ii. Determine the percentage of students who own motorbike or a car (2 mks)
Solution

motorbike
car
123
91

123 motorbike
91 cars
29 motorbike

Mr. Amos Mising’a ict and liberal studies department 24 | P a g e


29 cars
272 total (motorbike and cars)
If 272= 100%
120=? =44.12%
152=? =55.88%

3. given that u={mangoes, oranges, pineapples, watermelon, kiwi, apple, tangerine} if


A= { Mangoes, oranges, pineapples, watermelon, kiwi,} and
B={ kiwi, apple, tangerine}
Determine each of the following
i) Ac
c
ii)

4. Explain each of the following terms as used in set theory


i) Intersection set (2 mks)
ii) Complement set (2 mks)

5. The following information relate to the qualifications of employee of AZECT company.


Sam, john, willy and Ben have a diploma certificate with Sam and Ben also having
degrees. Sam, Melvin, Willy, Tom, Morries, and Ken are members. Of ICTAK certifyind
body, with Tom and Morris having a diploma certificate. Assume set A to be employee
with diploma certificate, set B employees who are ICTAK certified and set C degree
holder.
i) Identify the element of set A,B and C (3 mks)
ii) Draw a venn diagram to represent the set in (i) showing their respective elements
(4 mks)

Answers
A= sam, john, willy,Ben = diploma
C= sam, ben = degree
B= sam, Melvin, willy, tom ,morries, ken
A= tom, morries =diploma
Therefore
i) A={ sam, john, willy,Ben, tom ,morries}
B={ sam, Melvin, willy, tom ,morries, ken}
C={ sam, ben}
Venn diagram

APPLICATION AREAS OF SET


1. Mathematics:
- for analysis as practical application, for the objects that are relevant to mathematics
and language used
2. scientists

Mr. Amos Mising’a ict and liberal studies department 25 | P a g e


- for describing their basic concepts i.e turning machine in the language of set theory.
Though describing object, elements or figure, hence there is no question what you are
talking about.
3. Business
4. Patten matching and by extension, compiler
5. data structure
6. machine learning
7. database
8. class based object –oriented system
Assignment knec Nov 2017
1.
a) with the aid of a diagram, define the term complement of a set as used in set
theory (3 mks)
b) a researcher conducted a survey on beverage consumption by people who
attended aparty of three types of beverages: tea, coffee and water .The following
data was obtained. 55 drank tea, 45 drank coffee and 39 drunk water. Further 19
drunk tea and water,15 drunk coffee and tea, 14 drunk coffee and water while 4
drunk tea, coffee and water. Everybody at least took a drink
i) use venn diagram to present this information (4 mks)
ii) determine the number of people who drunk (4 mks)
(I) tea only
(II) coffee or water but not tea
Solution
Tea: 55, 19, 15, 4
Coffee: 45, 15, 14, 14
Water: 39, 19, 14, 4

I) n(tea) = 4
II) n(coffee or water)=6

Mr. Amos Mising’a ict and liberal studies department 26 | P a g e


TOPIC 4
INTRODUCTION TO COMPUTATIONAL MATHEMATICS
Content:
 Algebra
 Quadratic equations
 Simultaneous equation
 Linear equation with three or more unknown
 Definition of matrices
 Matrix operation
 Application of matrices

- A matrix consists of rows and column. i.e Rows are horizontal arrangement while column
are the vertical arrangement.
- E.g number of column rows
- Nb order of matrix B =* +, then the order is . Note we starts with the column
then followed by row.
TYPES OF MATRICES

There are several types of matrices, but the most commonly used are:

a) Rows Matrix
b) Columns Matrix
c) Rectangular Matrix
d) Square Matrix
e) Diagonal Matrix
f) Scalar Matrix
g) Identity Matrix
h) Triangular Matrix
i) Null or Zero Matrix
j) Transpose of a Matrix
k) Singular matrix

1. Row matrix
- A matrix is said to be a row matrix if it has only one row.
e.g A = [1 2 3 ]

2. Column matrix
- A matrix is said to be a column matrix if it has only one column.
e.g.

Mr. Amos Mising’a ict and liberal studies department 27 | P a g e


B=[ ]

3. Rectangular matrix
A matrix is said to be rectangular if the number of rows is not equal to the number of
columns

e.g. B= * +

4. Square Matrix
A matrix is said to be square if the number of rows is equal to the number of columns.

B= [ ]

5. Diagonal Matrix
A square matrix is said to be diagonal if at least one element of principal diagonal is non-
zero and all the other elements are zero.
e.g.

B =[ ]

6. Scalar Matrix
A diagonal matrix is said to be scalar if all of its diagonal elements are the same.

B =[ ]

7. Identity or Unit Matrix


A diagonal matrix is said to be identity if all of its diagonal elements are equal to one,
denoted by II.
e.g.

I =[ ] , I=* +

8. Triangular Matrix
A square matrix is said to be triangular if all of its elements above the principal diagonal
are zero (lower triangular matrix) or all of its elements below the principal diagonal are
zero (upper triangular matrix).

Mr. Amos Mising’a ict and liberal studies department 28 | P a g e


B =[ ] (lower triangular matrix)

B =[ ] (upper triangular matrix).

9. Null or Zero Matrix


A matrix is said to be a null or zero matrix if all of its elements are equal to zero. It is
denoted by

A =[ ] , A=* +

10. Transpose of a Matrix


Suppose A is a given matrix, then the matrix obtained by interchanging its rows into
columns is called the transpose of AA. It is denoted by AT

A =[ ] AT =[ ]

11. Singular matrix


If the determinant is zero, such a matrix has no inverse and is called Singular Matrix
A ( )
Det = (1x6)-(3x2)
Det A= 0

ADDITIONAL AND SUBTRACTION OF MATRICES


Example

If P= * + and Q = * + find

i) P+Q
ii) P-Q
Solution
i) P+Q = * ++* +

= * +

Mr. Amos Mising’a ict and liberal studies department 29 | P a g e


ii) P-Q = * +-* +

= * +

Example

if A= ( ) B= ( )and C= ( ) find

a) A-B+C
b) A-(B+C)
Solution

a) A-B+C = ( )-( )+ ( )

=( )

b) A-(B+C) = ( )-( )+ ( )

=( )-( )

=( )

Questions
1. State the order of each of the following matrices
a) ( )
b)

c) ( )

2. Give example of matrices of the following order.


a) 1x3
b) 3x2
c) 3x3
3. Given that

Mr. Amos Mising’a ict and liberal studies department 30 | P a g e


P= ( ), Q= ( ), R ( ) and S ( )

Find;
i) P – Q
ii) Q – P
iii) R – S
4. Find the unknown in each of the following
a) ( ) ( )

b) ( ) ( ) ( )

5. The number of vehicle passing through a road on a day one were; 10 buses, 6 Lorries
and 15 cars. On day two there were 4 Lorries, 20 cars and 7 buses and on day three
9cars, 3 buses, and 1 lorry. Tabulate this information in a matrix form and find the total
in each category for three days.

TRANSPOSE (AT)
- Row and column of a matrix A are integrated such that row becomes the first column,
second row becomes second column and so on, the resulting matrix is called the
transpose of A written as AT
Example

A=( ) then AT = ( )

6. Write down the transpose of each of the following matrices


a) ( )

b) ( )

c) ( )

MULTIPLICATION MATRICES

1. Given that ( ) then find : 3A

2. If ( ) find
i) 5B
ii) -3B

3. Consider the matrices ( ) and ( )

Mr. Amos Mising’a ict and liberal studies department 31 | P a g e


Solution

=( )

=( )

Therefore the matrix product

AB =( )

4. Find the product of the following matrices, where

i) ( )

ii) ( )( )

5. Find the unknown in each of the following


i) ( )( ) ( )

ii) ( )( ) ( )

DETERMINANT OF A MATRIX
Example

2. If A = ( ) then find the determinant of A


Solution
( )
Det A= 7
3. State the determinant of each of the following matrices
i) ( )

ii) ( )

iii) ( )

INVERSE OF A MATRIX

Example of inverse looks like ( )

Questions

1. Show that ( ) is the inverse of ( )

Mr. Amos Mising’a ict and liberal studies department 32 | P a g e


Solution
AB = ( )( )

=( )

=( )
Or
BA=( )( )

= ( )

2. Find the inverse of A= ( )


Solution
Det A =
=
= -4

A-1 =- ( )

A-1 = ( )

Note: in general, if X= ( )

Det X = ps –qr and

X-1 = ( )

= ( )

N/B If the determinant is zero, such a matrix has no inverse and is called Singular Matrix

Question
1. Find the determinant of each of the following matrices
a) ( )

b) ( )

c) ( )
2. Find where possible the inverse of each of the following matrices
a) ( )

b) ( )

c) ( )

Mr. Amos Mising’a ict and liberal studies department 33 | P a g e


d) ( )
3. Solve for unknowns in each of the following
a) ( )( )= ( )

b) ( )( )= ( )
4. Find the value of unknown if each of the following matrices is singular
a) ( )

b) ( )

5. Given that ( ), ( ) find


-1
a) AB
b) (A+B)-1

SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS USING MATRICES


- consider the simultaneous equation

- the above equation are written as equation

( )( ) ( )

Example 1
use the matrix method to solve the following pair of simultaneous equations

Solution
( )( ) ( )

Det = (3x-1)-(4x2)
= -3-8
= -11
Inverse
= ( )
Pre-multiplying both sides of the matrix equation by the inverse
( )( )( ) ( )( )

( ) ( )= ( )

( )=( )
Therefore a=2, b=3

Mr. Amos Mising’a ict and liberal studies department 34 | P a g e


DETERMINANT OF 3X3 MATRIXES

Let A=[ ]

| |=a| | | | | |
=
Example
Find the determinant of the following matrix

B=[ ]

Solution

| |= 6| | | | | |
=
= 6(3-10)-2(2-20)+3(4-12)
=6(-7) -2(-18)+3(-8)
= -42 +36 -24
=-30

CO-FACTOR
Co-factor will be = (-1)r+c where r = row, c=column
Example 1
1. write down the minor and co-factor of each element and also evaluate the determinant of

the matrix B=[ ]

solution
Let the minor be donated as Brc where r= row, C=column, Then
B11= | | = -10-30 = -40

B12= | | = 8-18 = -10

B13= | | = 20--15 = 35

B21= | | = 6--10 = 16

B22= | | = 2--6 = 8

B23= | | = 5-9 = -4

B31= | | = 18-10 = 8

B32= | | = 6-8 = 14

Mr. Amos Mising’a ict and liberal studies department 35 | P a g e


B33= | | = -5-12 = -17
Let Mrc donate the co-factorwhere r= row, C=column, Then
M11 = (-1)1+1(-40) = -40
M12 = (-1)1+2(-10) = 10
M13 = (-1)1+3(35) = 35
2+1
M21 = (-1) (16) = -16
2+2
M22 = (-1) (8) = 8
M23 = (-1)2+3(-4) = 4
3+1
M31 = (-1) (8) =8
3+2
M32 = (-1) (14) = -14
3+3
M33 = (-1) (-17) = -17
Finally the determinant is given by

| |= [ ]

= 1(-40) -3(10) -2(35)


= -80
Example 2

Find A-1 and B-1 if A * + and B=[ ]

Solution
A11=1 , A12=0 A21=1, A22=2
M11=1 , M12=0, M21=1, M22=2
Therefore matrix of co-factor is

=* +

The adj = * +T

=* +

Determinant | |
=

A-1 = 1/2 ( )

= ( ) is inverse

Similarly

B11=| | , B12=| | , B13=| |

Mr. Amos Mising’a ict and liberal studies department 36 | P a g e


B21=| | , B22=| | , B23=| |

B31=| | , B32=| | , B13=| |

Co-factor
M11 = 6 , M12 = -1 , M13 = -1
M21 =-2 , M22 = 1 , M23 = 0
M31 = -3 , M32 = 0 , M33 = 1
The matric of co-factor

=[ ]

Therefore the adjB= [ ]

Therefore considering this rule

=[ ]

Then, | |
=1(B11) -2(B12) + 3(B13)
=1(6) -2(1) + 3(-1)
=6 -2 +3 =7
Hence

B-1 = 1/7 [ ]

Assignment
1. find the value of x, y & z
=3
=12
=6
Solution
This is Cramer’s rule

Mr. Amos Mising’a ict and liberal studies department 37 | P a g e


[ ] * +=[ ]

X=x/-
Y=y/-
Z=z/-
Change = 1(1-3)-2(2-3)+1(2-1)
= -2-2+1=-3

Change x =[ ]

=3(1-3)—2(12-18)+1(12-6)
=-6-12+6
=-12
Then x=change x/change
= -12/3
=4

Change y=[ ]

=1(12-18)-3(2-3)+1(12-12)
=-6+3+0
= -3
Then y =change y/change
=-9/-3
=3

Change z=[ ]

=1(6-12)-2(12-12)+3(2-1)
=-6-0+3
= -3

ROW REDUCTION METHOD/ GAUSSIAN ELIMINATION METHOD (3x3)

Students to some research and give example

* +* +| |* +=[ ]

( )( )( )( )( ) ( )

i)

Mr. Amos Mising’a ict and liberal studies department 38 | P a g e


TOPIC 5
DATA COLLECTION REPRESENTATION
Content:
 Basic data collection
 Data classification
 Data tabulation
 Data presentation
Data is basic information, usually in number form.
Statistics is a branch of mathematics that deals with collection, organisation, representation
and interpretation of data.
Data can be obtained for:-
i) Mass in kilograms, of students in school.
ii) The age, in years, of the students in a class
iii) The height , to the nearest centimetres
iv) The shoe size worn by the students in a class
v) The number of children in a family
vi) The marks obtained in a recent test

Frequency distribution table


- The following data represents the shoe size worn by 20 form two students;
7,9,6,10,8,8,9,11,8,7,9,6,8,10,9,8,7,7,8,9
 The data can be represented in a frequency distribution table
Shoe size Tally (Frequency) No. of
students
6 II 2
7 IIII 4
8 IIII I 6
9 IIII 5
10 II 2
11 I 1
20

Frequency
- This is the number of times an item or values occurs e.g 8 appears six times.
Therefore, the frequency of 8 is six
Question
The data below shows marks obtained by 20 students for an essay;
9,5,5,4,5,3,5,11,6,3,6,8,9,6,13,8,8,13,5,10
i) Prepare a frequency distribution table

Mr. Amos Mising’a ict and liberal studies department 39 | P a g e


TOPIC 6
MEASURE OF CENTRAL TENDENCY
Content:
 Definition of measure
 Properties
 Calculation
 Interpretation
In general cover (Definition of central tendency, Mean, Mode, and Median)
MEAN, MODE, MEDIAN
Mean
Mean is usually referred to as the arithmetic mean, and average value for the data
Example 1
Find the mean of the following marks
9,5,5,4,5,3,5,11,6,3,6,8,9,6,13,8,8,13,5,10
Solution
The mean mark = Totals marks required
Total number of students
= 142/20
= 7.1

Find the mean by using frequency distribution table.


Marks (x) Frequency (f) fx
3 2 6
4 1 4
5 5 25
6 3 18
8 3 24
9 2 18
10 1 10
11 1 11
13 2 26

Key

= mean

Mr. Amos Mising’a ict and liberal studies department 40 | P a g e


=
= 142/20
= 7.1

Mode
This is the most frequency occurring item or value in a data.
Range: The difference between the maximum and minimum data entries in the set. Range =
(Max. data entry) – (Min. data entry)
Median
When data is arranged in ascending or descending order, the middle item is the median
Example
5,4,8,10,13
Solution
Rearrange: 4,5,8,10,13
Median = 8
Example 2
13,6,4,9
Solution
Rearrange: 4,6,9,13
= 6+9 = 15
2 2

= 7.5

Example 3
The following frequency distribution table represent masses in kilograms of children in a
class. Find mean, mode and median
Mass of
35.5 36.8 38.2 40.0 40.2 41.0 41.4
children:
No. of
4 3 2 2 2 14 8
children:

Solution

Mr. Amos Mising’a ict and liberal studies department 41 | P a g e


Mass of children (x) Frequency (f) Fx
35.5 4 142
36.8 3 110.4
38.2 2 76.4
40.0 2 80.0
40.2 2 80.4
41.0 14 574
41.4 8 331.2

Mean =
= 1394.4/35
= 39.84

Mode = 41.0
Median = 40.0

GROUPED DATA
Masses of fish in kilogram caught by fishermen in one day
Mass : 0-4 5-9 10-14 15-19 20-24 25-29 30-34 35-39
No. of
2 6 20 12 10 5 6 2
fish:

Solution
Mass Mid-point (f) Frequency (f) fx
0-4 2 2 4
5-9 7 6 42
10-14 12 20 240
15-19 17 12 204
20-24 22 10 220
25-29 27 5 135
30-34 32 6 192
35-39 37 2 74

Mean ( x ) =
= 1111/163
= 17.635
Mode = 10 – 14
MEAN USING WORKING (ASSUMED) MEAN

Mr. Amos Mising’a ict and liberal studies department 42 | P a g e


The table below shows a frequency distribution for the final marks in a mathematics
examination
Marks: 0-9 10-19 20-29 30-39 40-49 50-59
No. of
3 6 5 11 3 2
pupils:
Calculate the mean, if the assumed mean is 34.5
Solution
Marks Mid-point (x) T=x – assumed F Ft
mean
0-9 4.5 -30 3 -90
10-19 14.5 -20 6 -120
20-29 24.5 -10 5 -50
30-39 34.5 0 11 0
40-49 44.5 10 3 30
50-59 54.5 20 2 40

Mean of t =

Therefore, mean X (x) = 34.5+-6


= 28.2

Mr. Amos Mising’a ict and liberal studies department 43 | P a g e


TOPIC 7
MEASURE OF DISPERSION
Content:
 Characteristics
 Relative and absolute measure
 Measure calculation and interpretation
In general cover (Range, standard deviation I.e SD, quartile, Decile, Percentile, Skewness
and Kurtosis)
QUARTILE, DECILES AND PERCENTILE
Median
Median divides a set of data into two parts, in each there are an equal number of items
Quartiles
It divides a set of data into four equal parts. E.g the lower quartile and the upper quartile
Deciles
It divides a set of data into ten equal parts.

Example
The table below shows the distribution of height to the nearest cm of 40 students.
Height cm 145-149 150-154 155-159 160-164 165-169 170-174 175-179
Frequency 2 5 16 9 5 2 1
Calculate
a) Median height
b) i) lower quartile
ii) upper quartile
c) 80th percentile
Solution
Heights Frequency Cumulative frequency
145 – 149 2 2
150 – 154 5 7
155 – 159 16 23
160 – 164 9 32
165 – 169 5 37
170 – 174 2 39
175 – 179 1 40

Both 20th and 21st students fall in class/height of 155 – 159, the class is called median class
( )
Using the formula

Mr. Amos Mising’a ict and liberal studies department 44 | P a g e


Where ;

Therefore
a)

Height of the 20th student ( )

( )

Height of the 21st student ( )

Median height

b)
i) Lower quartile (Q1)
( )
Q1
( )

ii) Upper quartile (Q3)


( )
Q3
( )

c) 80th percentile

The 32nd student fall in 160 – 164 class

Mr. Amos Mising’a ict and liberal studies department 45 | P a g e


The 80th percentile
( )
=

( )

Assignment
1. The masses of 100 patients in a hospital were distributed as shown in the table
Mass kg 0-9 10-19 20-29 30-39 40-49 50-59 60-69 70-70 80-89 90-99
Frequency 3 7 8 9 12 18 25 10 6 2
Calculate
a) Median
b)
i) lower quartile
ii) upper quartile
th
c) 70 percentile

MEAN, VARIANCE AND STANDARD DEVIATION


The table below shows the distribution of marks of 40 candidates in a class.
Marks 1-10 11-20 21-30 31-40 41-50 51-60 61-70 71-80 81-90 91-100
Frequency 2 2 3 9 12 5 2 3 1 1
Calculate
i) Mean
ii) Variance
iii) Standard deviation
Solution
Mid-point Frequency
Marks Fx d=x-m d2 Fd2
(x) (f)
1-10 5.5 2 11.0 -39.5 1560.25 3120.5
11-20 15.5 2 31.0 -29.5 780.25 1740.5
21-30 25.5 3 76.5 -19.5 380.25 1140.75
31-40 35.5 9 319.5 -9.5 90.25 812.25
41-50 45.5 12 546.0 -0.5 0.25 3.00
51-60 55.5 5 277.5 10.5 110.25 551.25
61-70 65.5 2 131.0 20.5 420.25 840.5
71-80 75.5 3 226.5 30.5 930.25 2790.75
81-90 85.5 1 85.5 40.5 1640.25 1640.25
91-10 95.5 1 95.5 50.5 2550.25 2550.25
∑fd2=1590

Mr. Amos Mising’a ict and liberal studies department 46 | P a g e


a) Mean ( x )
b) Variance = - )2

c) Standard deviation

PROPERTIES OF STANDARD DEVIATION

i) Standard deviation is only used to measure spread or dispersion around the mean of a
data set
ii) Standard deviation is never negative
iii) Standard deviation is sensitive to outliers
iv) For data with approximately the same mean, the greater the spread, the greater the
standard deviation.

KURTOSIS AND SKEWNESS


What is kurtosis?
- Kurtosis describe the different kinds of peaks that probability distribution can have
- Distribution of data and probability distribution are not all same shape, some are
symmetric and skewed to the left or to the right. Others are biomodal and have two
peaks

- Diagram

Mr. Amos Mising’a ict and liberal studies department 47 | P a g e


- Another to consider when talking a bout a distribution is the shape of a tail of the
distribution on the far left and far right. Therefore
- Kurtosis is the measure of thickness or heaviness of the tail of distribution

What is skewness?
- Skewness is a measure of symmetry or more precisely the lack of symmetry. A
distribution or data set is symmetric if it looks the same to the left and right of the
centre point.
- Negative skew: The left tail is longer and the mass of distribution is concentrated on
the right of the figure. The distribution is said to be left skewed/left tailed or skewed
to the left
- Positive skew: The right tail is longer and the mass of distribution is concentrated on
the left of the figure. The distribution is said to be right skewed/right tailed or
skewed to the right

diagram
-
Assignment
1) The table below shows the length in centimetres of 80 plants of a particular species of
tomatoes
Length 152-156 157-161 162-166 167-171 172-176 177-181
Frequency 12 14 24 15 8 7
Calculate
a) Mean
b) Standard deviation
v) The table below shows the distribution of age in months of 80 form four students in a
school
Age in 210-212 213-215 216-218 219-221 222-224 225-227 228-230
months
Frequency 2 8 25 18 12 1`0 5
Calculate
a) Mean
b) Variance
c) Standard deviation
vi) The table below shows frequency distribution for final marks in a mathematics
examination
Marks 0-9 10-19 20-29 30-39 40-49 50-59 60-69 70-70 80-89 90-99
No. of stu 3 6 5 11 4 3 2 3 2 1

Calculate
a) The median and the quartiles
b) The 4th and 6th decile
c) The 30th and 70th percentile
d) The standard deviation
vii) The table below shows distribution of wages of 40 employees
Wages 20-29 30-39 40-49 50-59 60-69 70-70 80-89 90-99
No. of 5 7 9 4 5 4 2 1

Mr. Amos Mising’a ict and liberal studies department 48 | P a g e


employee

Calculate
a) Mean
b) Standard deviation
viii) The following marks were obtained in a mathematics test by 25 students.
Marks 30-39 40-49 50-59 60-69
Frequency 10 7 5 3
Calculate
a) Mean
b) Standard deviation

Mr. Amos Mising’a ict and liberal studies department 49 | P a g e


TOPIC 9
GRAPHS AND FUNCTION
Content:
 Continuous functions
 Interpolation and extrapolation (intercepts and gradients)
 Graphs and functions
 Area under the curve
 Error in a graph (pie, Bar, pictogram &Histogram charts)
 Inequalities

ALGEBRAIC EXPRESSION

Simply the following:


a)
Solution

b)
Solution

c)
Solution

FACTORISATION
a)
Solution

b)
Solution
)

c) X2
Solution

Mr. Amos Mising’a ict and liberal studies department 50 | P a g e


d)
Solution

SIMPLIFICATION BY FACTORISATION
Simplify

a)

Solution

b)

Solution

LINEAR EQUATIONS
- Linear equations are straight lines involving one or two unknowns
Example
Solve the unknown in each of the following equations
a)
Solution

b)

Solution

Mr. Amos Mising’a ict and liberal studies department 51 | P a g e


c)

Solution

d)

Solution

Work out
a)
b)
c)

LINEAR EQUATION IN TWO UNKNOWN


Methods of solving
1. Elimination method
2. Substitution method
By Elimination method
1. Solve the following simultaneous equations by elimination method
a)

Solution

Add (i)+(ii)

Mr. Amos Mising’a ict and liberal studies department 52 | P a g e


b)
6

Solution

c)
5x

Solution

5x

Mr. Amos Mising’a ict and liberal studies department 53 | P a g e


6

Assignment
1. Solve the following simultaneous equations by elimination method
a)

b)

c)

d)

By substitution method
1. Solve the following simultaneous equations by substitution method
a)

Solution

b)

Mr. Amos Mising’a ict and liberal studies department 54 | P a g e


Solution

( )

Assignment
1. Solve the following simultaneous equation by substitution method
a)

b)

c)

d)

TYPES OF FUNCTIONS
1. Constant functions
- let A and B be any two non-empty set, there a function F from A toB is called a
constant function if and only if the range of F is a singleton
2. Algebraic function

Mr. Amos Mising’a ict and liberal studies department 55 | P a g e


- A function defined by an algebraic expression is called an f(x)=x2+3x+6
3. Polynomial function
- A function of the form P(x)=amxn+an-1xn-1+… +a1x+a0
- Where ‗n‘ is a positive integer and an,an-1,…a1,ao are real numbers is called a
polynomial function of degree ‗n‘
4. Linear function
- A polynomial function with degree ‗t‘ is called a linear function. The most general
form of a linear function is f(x)=ax+b
5. Quadratic function
- A polynomial function with degree ‗2‘ is called a quadratic function. The most
general form of quadratic equation f(x)=ax2 +bx+ c
6. Cubic function
- A polynomial function with degree ‗3‘ is called a cubic function. The most
general formof a cubic function is f(x)=ax 3+bx2+cx+d
7. Identity function
- Let f:A→B be a function then ‗f‘ is called an identity function if f(x)=x,ꓦ xꜪA
8. Rational function
- A function R(x) defined by R(x)= where both and are polynomial
functions is called a rational function
9. Trigonometric function
- A function f(x)=sinx,f(x)=cos(x) etc, then f(x) is called a trigometric function.
10. Exponential function
- A function etc, then is called an exponential
function
E.g 9x , =3x

11. Logarithmic function


- A function in which the variable appears as an argument of a logarithm is called a
logarithm function
- Eg f(x)=log a(a)
12. Explicit function
- An explicit function is one which is given in terms of the independent variable
- Eg y=x2+3x-8
- Y is the dependent variable and is given in terms of independent variable x
- Note that y is the subject of the formation
13. Implicit function
- Implicit function is given in terms of both dependent and independent variable
- Eg y+x2-3x+8=0
FACTORISATION OF QUADRATIC EXPRESSION
Factorise
i) X2 +6x+9
ii) X2 -5x+6
iii) 4X2 -12x+9
iv) X2 -8x+16
v) X2 +x+12
vi) 4X2 +4x-3

Mr. Amos Mising’a ict and liberal studies department 56 | P a g e


vii) 9X2 -6x+1
viii)3X2 -11x-4
Completing the square
We factorised the following expression and got the factors given
i) X2 +6x+9 = (x+3)2
ii) 4X2 -12x+9 = (2x-3)2
iii) X2 -8x+16 = (x-4)2
iv) 9X2 -6x+1 = (3x-1)2
These expressions are perfect squires
i) Any quadratic equation can be simplified and presented in the form aX2 +bx+c
where, a,b,c are constant and a≠0
2
ii) You will notice that in all case ( =

Example 1
Make X2 +10x to be perfect squire

Solution
Add a constant c to the expression
X2 +10x+c
( 2=
52 =c
25=c
Therefore 25 must be added to X2 +10x to make it a perfect squire
Alternative solution
Add a constant c to an expression
X2 +10x+c = (X+k)2 where k is another constant
X2 +10x+c = X2+2xk+k2
Comparing coefficient of x
10x = 2xk
K=5
C= k2
C= 52 = 25
Example 2
What must be added to X2 + _+36 to make it a perfect squire?
Solution
2
Therefore ( = third term
X2 + _+36
2
( =362

Mr. Amos Mising’a ict and liberal studies department 57 | P a g e


( √

Exercise
In each of the following expression, insert the term which will make it a perfect squire
i) X2 -16x+_
ii) X2 +2x+_
iii) X2 +_+16
iv) X2 -_+100
v) A2 -_+b2
vi) A2 +_+b2
Example 3
What must be added to 25x2 +_+9 to make it a perfect squire?
Solution
2
- Therefore ( =1st term x third term
- Make the above example to look like quadratic equation
2
( =(

or -30
Example 4
What must be added to _ -40x+25 to make it a perfect square?
Solution
Let the missing term be ax2
ax2_40x+25 is perfect squire
(-40/2)2=25a
400=25a
a=16
Thus the missing term is 16x2

Assignment
1. In each of the following expression, insert the term which will make it a perfect squire
i) 25x2+40x+_
ii) 9x2-6x+_
iii) 36x2-_+25
iv) 49x2-_+4
v) _+14x+1

Mr. Amos Mising’a ict and liberal studies department 58 | P a g e


QUADRATIC EQUATION BY COMPLETING THE SQUARE
1. Solve X2+4x-12=0 using the completing the square method

Solution
X2+4x=12
The expression on the left hand side can be made a perfect square by adding 4 to both sides.
We get
X2+4x+4=12+4
(x+2)2=16

X+2=√ =_+4
X=-+4-2
X=2 or -6
Nb this method of solving a equation is known as completing the square
2. Solve X2+5x+1=0 using the completing the square method
Solution
X2+5x+1=0
X2+5x=-1
X2+5x+(5/2)2=(5/2)2-1
X2+5x+(25/4)=(25/4)-1
X2+5x+(25/4)=5.25
Factorising the L.H.S gives
(X+5/2)2= 5.25

X+5/2= √
X+2.5= +-2.29
X=+2.29-2.5=-0.21
Or x=-2.29-2.5=4.79
Exercise
Use the method of completing the square to solve the following quadratic equation.
a. X2+2x-1=0
b. X2-8x+13=0
c. X2+5x+3=0
d. X2-5x+2=0
e. X2-3x-5=0
f. X2-8x-30=0

Mr. Amos Mising’a ict and liberal studies department 59 | P a g e


g. X2+6x-3=0
h. X2-22x+6=0
i. X2+7x+3=0

Note: when the coefficient of x2is not equal to one

Example 1
Solve the equation 2X2+4x+1=0 using the method of completing the square
Solution
2X2+4x+1=0
2X2+4x=-1
Divide by 2 both sides
X2+2x=-1/2
Add 1 to complete the square on L.H.S
X2+2x+1=1-1/2
(X+1)2=1/2

X+1=√ =+- 0.7071


X =0.7071-1 = -0.2929 or
X=-07071-1 = -1.7071
Exercise
Solve the equation below using the method of completing the square
1. 2X2+3x-7=0
2. 5X2+6x-3=0
3. 6X2-5x-4=0
4. 3X2+7x-4=0
5. 4X2+3x-5=0
6. 2X2+9x+9=0
7. 4X2+12x-9=0
8. 4-9x-3X2=0
9. 2x(x+1)=4
THE QUADRATIC FORMULA
- Consider the general quadratic equation aX2+bx+c=0 where a≠0
- Solve it by completing the square method

- This is solution to the general quadratic equation and known as the quadratic formula
- The expression is known as the discrimint. It allows us to determine the
nature of the roots of the quadratic equation.

Mr. Amos Mising’a ict and liberal studies department 60 | P a g e


Example 1
Use the quadratic formula to solve 2x2 -5x-3=0

Solution
From the general equation aX2+bx+c=0 we get a=2, b=-5,c=-3
Substituting in the quadratic formula


=


=


=

or

or

Assignment

The quadratic equation 2x2+(p+1)x+q-2=0 has two roots as -3 and . Determine the value of
p and q in the equation.
Solution
a=2, b=p+1, c=q-2

Mr. Amos Mising’a ict and liberal studies department 61 | P a g e


√ =√

Exercise
Use the quadratic formula to solve the following equation
1. X2+7x+3=0
2. 2X+7-7X2=0
3. 4d2+7d+3=0
4. X2-4x+3=0
5. 3X2-3x-2=0
6. 9p2+24p+16=0
7. 2X2+11x+7=0
8. 5r2-5r+1=0
9. 6k2+9k+1=0

GRAPHS

1. Draw the graph of

Solution

X -4 -3 -2 -1 0 1 2 3 4
Y 16 9 4 1 0 1 4 9 16

 Draw suitable graph


2. Draw graph

Solution
X -5 -4 -3 -2 -1 0 1 2 3 4 5
8 8 8 8 8 8 8 8 8 8 8 8
+2x -10 -8 -6 -4 -2 0 2 4 6 8 16
2
-x -25 -16 -9 -4 -1 0 1 4 9 16 25
-27 -16 -7 0 5 8 11 16 23 32 49

Mr. Amos Mising’a ict and liberal studies department 62 | P a g e


 Draw suitable graph

Exercise
1. Draw the graph of the following quadratic function for given range of the value of x. in
each case state the equation of line of symmetry and the minimum /maximum value of the
function
a.
b.
c.
d.
e.

2. Use the graphical method to solve the following pairs of simultaneous equation
i)

ii)

iii)

iv)

3. use the graphical method to solve the equation

4. plot the graph of hence solve the equation

5. using the graphical method, solve the following set of simultaneous equation

LINEAR INEQUALITIES
Example 1
Solve the following linear inequalities
1.

Solution

2.
Solution

Mr. Amos Mising’a ict and liberal studies department 63 | P a g e


the sign changes when you divide by -ve

3.

Solution

4. Solve each of the following inequalities (6mks)


i)

13

ii)

Mr. Amos Mising’a ict and liberal studies department 64 | P a g e


TOPIC 10
ELEMENTS OF PROBABILITY
Content:
 Modelling
 Scale
 Space
 Multiple probabilities
 Conditional probability
 Probability tree
Consider the following situation
- a candidate in a certain school would like to know his/her chances of passing the final
examination
- each player would to know his/her chances of winning a game
- a traveller would like to know which is safer to travel by road or rail
Therefore
Probability is the numerical measure of the chances. In case, we say that probability that the
cow giving birth to a heifer is and that of getting a bull is

Experimental probability
- a fair coin was tossed 100 times and the number of heads and tails showing up were
recorded as 54 and 46 respectively.
 54 were heads and 46 were tails
 The probability of a head occurring may be donated by
 P(Head) or P(H)
 This is what we referred to as experimental probability
Notes
i) What is done or observed together with the recorded observation is the experiment
ii) Each toss is called a trial and in this case there are 100 trials
iii) The possible result of a trial is called an outcome.
iv) OR means addition (+) , And means multiplication (*)
v) Generally experimental probability of a result is given by

Example 1
A boy had a fair die with faces marked 1 to 6. He threw this die up 50 times and each time he
recorded the number on the top face. The result of this experiment is shown in table below
Face 1 2 3 4 5 6
Number of times a 11 6 7 9 9 8
face has shown up
With is the experimental probability of getting

Mr. Amos Mising’a ict and liberal studies department 65 | P a g e


a) 1
b) 4
c) 6
Solutions

a) P(Event)
b) P(1)
c) P(4)
d) P(6)

Example 2
From the past record, out of the ten matches a school football has played. It has won seven.
How many possible games might the school win in thirty matches.
Solution

 P(winning in one match)


 The number of possible wins in thirty matches x30

Exercise
1. Toss a coin 10 times and recorded the number of times a head shows up. Use the result of
your experiment to determine the probability of a head showing up in a toss.
2. Statistics have shown that 38 out of every 1000 new bulb of a certain type burn out within
6 months. What is the probability of buying a bulb which will not burn in 6 months‘ time?

Solution
P(B)

3. Throw two dice , whose faces are numbered 1 to 6, fifty times. Record the sum of the
numbers that appear on their ops each time. find the experimental probability that the sum
is
a) 7
b) 1
c) 2
d) 4
e) 13
Solution
1 2 3 4 5 6
1 2 3 4 5 6 7
2 3 4 5 6 7 8
3 4 5 6 7 8 9
4 5 6 7 8 9 10
5 6 7 8 9 10 11

Mr. Amos Mising’a ict and liberal studies department 66 | P a g e


6 7 8 9 10 11 12
a)
b)
c)
d)
e)
4. After tossing a coin 10 times, it was found that the probability of getting a head is 0.4.
what is the probability of getting a tail in this experiment?

Solution
 P(H) and tail
 P(T)
5. Out of 20 days, Rono did not use his pen for 4 days because he did not fill it with ink and
he did not use it for 3 days because he forgot it at home. Find the probability that in a
given day during that period
a) He forgot his pen at home
b) He used his pen in school
6. The number of days with rainfall at a station was recorded for the whole year in a table as
shown below.
Month J F M A M J J A S O N D
No. of 3 4 8 18 9 5 4 6 9 12 6 4
days
with
rainfall
a) The probability that a day in November had same rain
b) The number of months for which the probability of a day with rain is less than 0.3
c) The probability that a day in the last three months of the year has the same rain
d) The probability that a day in a year will have rain
7. The statistics club of a school recorded the number of persons in each passing vehicle a
long a road for 1 hour as follows
No. of person in a 1 2 3 4 5
vehicle
No. of vehicle 60 50 20 30 10
Find the probability that a vehicle passing a long the road had
a) An odd number of persons
b) An even number of person

PROBABILITY SPACE /SAMPLE SPACE / POSSIBILITY SPACE


This is the list of all outcome of occurrence. E.g possible outcomes from such a single toss of
a coin are the occurrence of a head or tail.
e.g
- If two coins are tossed together once, the probability space HH,TT,HT,TH

Mr. Amos Mising’a ict and liberal studies department 67 | P a g e


- In this case there are 4 possible out comes. Thus
i) P(two head)
ii) P(a head and a tail)
iii) P(two tail)

This kind of probability is then referred to as theoretical probability.


Tossing a fair Die
i) If a fair die is tossed once, what is the probability of a 3 showing up?
 Since the die has six faces and each face is equally likely to come up, the
probability space is 1,2,3,4,5, and 6
 Therefore
ii) What is the probability of getting an odd number when a fair die is tossed once ?
 Odd number 1,3 and 5 you count how many are the space 3

iii) What is the probability of getting a prime number of a single toss of a fair die?
 Prime number 2,3 and 5

Example 1
1. A basket contains 5 red balls, 4 green balls and 3 blue balls. If a ball is picked at random
from the basket, find
a) The probability of picking a blue ball
b) The probability of not picking a red ball
Solution
a) Total number of balls is (5+4+3) =12
The number of blue ball = 3

b) The number of red= 5 , not red (12-5) = 7

Example 2
Two dies are tossed together, what was the probability that the sum of the two upper faces
will be.
a) 7
b) 9

Solution

Mr. Amos Mising’a ict and liberal studies department 68 | P a g e


1 2 3 4 5 6
1 2 3 4 5 6 7
2 3 4 5 6 7 8
3 4 5 6 7 8 9
4 5 6 7 8 9 10
5 6 7 8 9 10 11
6 7 8 9 10 11 12
a)
b)
From the table there are 36 likely outcome
Example 3
A bag contains 6 black balls and some brown ones. If a ball is picked at random the
probability that it is black is 0.25. Find the number of brown balls
Solution
Let x be total out come in a bag

x
x
Therefore the brown ball =24 – 6 = 18

Or

6=1.5+0.25B
0.25B=6-1.5

B=

B=18

Exercise
a) Faces of a regular tetrahedrum are marked with number 1,2,3 and 4. If the tetrahedrum is
tossed once, calculate the probability that the face marked 3 lands at the bottom.
b) What is the probability of getting a number that is not prime with a single toss of a die?
c) Two dice are tossed together. What is the probability the sum of the numbers showing on
their upper face is
a) 3
b) 5
c) 8
d) A bag contains 4 green balls and 5 yellow balls. If a ball is picked at random from the
bag, find the probability that is
a) A green ball
b) A yellow ball

Mr. Amos Mising’a ict and liberal studies department 69 | P a g e


e) An urn contains green and red marbles. The probability of picking green marble is
a) What is the probability of picking a red marble
b) If there are 14 green marbles, what is the total number of marble in urn?

COMBINED EVENTS
1. Consider the probability of two or more events occurring mutually exclusive events. Is
an occurrence of one exclude the occurrence of the other e.g
i) if a coin is tossed?
P(head or tail)= P(head)+P(tail)

2. A die is thrown once. Find the probability of getting


a) an even number or 3
b) an odd number or a 4
c) 3 or less
d) At most 4
e) At least 5
f) 4 or more
g) Not more than 2
Solutions
a) P(an even number or 3)
=P(3)+p(an even number)
=P(2 or4 or6) +P(3)
= +

b) P(an odd number or 4)


=P(4)+p(an oddn number)
=P(1 or3 or5) +P(4)
= +

c) P( 3or less)
=P(3)+P(2)+P(1)
=P(2 or4 or6) +P(3)
= +

d) P(at most 3)
=P(3)+P(2)+P(1)
=P(2 or4 or6) +P(3)
= +
e) ??
f) P(4 or more) = P(at least 4)
=P(4 or5 or 6)

Mr. Amos Mising’a ict and liberal studies department 70 | P a g e


= +
g) P(not more than 2)= P(1 or 2)
=p(1) +p(2)
= +

INDEPENDENT EVENTS
Two events A and B are said to be independent if the occurrence of A does not influence of B
and vice versa.
Example 1
A coin is tossed twice. What is the probability of getting a tail in both tosses?
Solution
A coin is tossed twice. What is the probability of getting a tail in both tosses?
P(T and T) = P(T) x P(T)
=

Example 2
A boy throws a fair coin and a regular tetrahedron with its four faces marked 1,2,3 and 4.
Find the probability that he get a3 on the tetrahedron and a head on the coin.
Solution

P(H)= , P(3)xP(3)=
P(H and 3)=
= =¼
Example 3
Three different machines in a factory have different probability of breaking down during a
shift as shown in a table.
Machine Probability of breaking
A 4/15
B 3/10
C 2/11
a) Find the probability that all machines will break down during one shift
b) The probability that none of the machines will break down in a particular shift
Solution
a)
=P(A and B and C breaking)
=
=

b)

Mr. Amos Mising’a ict and liberal studies department 71 | P a g e


=P(none of machine A , B and C breaks down)
=P(A not breaking down)x P(B not breaking down)x P(C not breaking down)
=
=

Example 4
A bag contains 8 black balls and 5 white ones. If two balls are down from the bag, one at a
time, find the probability of drawing a black ball and a white ball
a) Without replacement
b) With replacement
Solution
a) =P(W followed by B)=P(W and B)
=
=
=P(B followed by W)=P(B and W)
=
=
Therefore
P(W and B)+ P(B and W)
=
=

b) P(W and B)
=
=
P(B and W)
=
=
Therefore
P(W and B)+ P(B and W)
=
=

Example 5
Two marbles are drawn in turns from a pack containing 3 red marbles, 6 white marbles, 7
black marbles and 9 green marbles.
a) If this done with replacement, determine the probability of drawing
i) Two white marbles

Mr. Amos Mising’a ict and liberal studies department 72 | P a g e


ii) A black then a green ball
iii) No red marbles
b) Repeat the question for no replacement
Solution
a)
i) Probability of drawing a white marble = 6/25. Since there is replacement, the
white marbles is replaced and probability of drawing a white marble on the
second drawn is 6/25. Therefore

P(W and W)
= =
=

ii) P(B and G)


= =
=
iii) The probability of drawing a non-red marble is 22/25. The probability of drawing
a white, black or green marble on both the 1st and 2nd draws with replacement is
Is

B)
If the drawing of the marbles is done with replacement

i)
ii)
iii)

Example 6
Kamau, Njoroge and Karioki are practicing archery. The probability of kamau hitting the
target is 2/5, that of Njoroge hitting the target is ¼ and that of Kariuki hitting the target is 3/7.
Find the probability that in one attempt
a) Only one hits the target
b) All three hits the target
c) Non of them hits the target
d) Two hits the target
e) At least one hits the target

Mr. Amos Mising’a ict and liberal studies department 73 | P a g e


Solution
a) P(only one hit the target)
=P(one of the men hit and the other two miss)
= P(only Kamau hits and other two miss) =
=P(only Njoroge hits and other two miss)=
= P(only kariuki hits and other two miss=
= P(only one hits) =P(kamau hits or Njoroge hits or Karuoki hits)
=

b) P(all three hits ) =


=
=
c) P(non hits)=
=
d) P(two hits the target) is the probability of Kamau and Njoroge hit the target and
Kariuki misses
=
Njoroge and Kariuki hits the target and Kamau misses
=
Or
Kamau and Kariuki hits the target and Njoroge misses
=( ) ( ) ( )
=
=
e) P(at least one hits the target) = P(1 or 2 or 3 of the players hits the target)
=
=
=

Alternative
P(at least one hits the target) = 1-P(non heats the target)
= 1-
=

Exercise
1. The probability of kilonzo hitting a target with an arrow is 2/3. What is the probability of
him missing the target in four consecutive attempts
2. The probability of Juma, Ali and Musa passing an examination are 1/3, 3/5 and ¼
respectively. Find the probability that

Mr. Amos Mising’a ict and liberal studies department 74 | P a g e


a) Either Juma or Ali will pass
b) Both Ali and juma will pass
c) All the three will fail
3. Two balls are drawn in turns without replacement from a box containing three green and
two white balls. Find the probability of drawing
a) Two green balls
b) Two white balls
c) Two balls of the same colour
d) Two balls of different colour
e) At least one green ball
4. A committee of three people is to be chosen at random from three men and two women.
Find the probability that
a) All three people chosen is a women
b) One of the three people chosen is a woman
5. Two players X and Y play a game. The probability of X and Y winning the game 0.4 and
0.25 respectively. If neither X or Y wins, the game is drawn. Find the probability that the
game is
a) Drawn
b) Either won by Y or drawn
6. The probability that Jane wins a game is 0.6. She plays the game until she loses.
Determine the probability that she will not play the fifty game

TREE DIAGRAM
Suppose that a coin is tossed twice

Note: The probability of mutually exclusive events and those of independent events are best
done by the use of a tree diagram.
Example 1
A coin is tossed three times
a) Draw a tree diagram to show all the possible out come
b) Find the probability of getting
i) One head
ii) Two heads and a tail, in that order
iii) Two heads and a tail in any order
iv) Three heads
v) At least one head
vi) No head

Mr. Amos Mising’a ict and liberal studies department 75 | P a g e


Solution
The possibility are HHH, HHT,HTH, HTT, THH, THT, TTH and TTT

i) P(one head)=p(HTT+P(THT)+P(TTH)
=( ( )
=(
ii) P(two head and a tail in that order)
=p(HHT)
=(
iii) P(two heads and a tail in that order)
=p(HHT)+P(HTH)+P(THH)
=(
iv) P(Three heads)=p(HHH)
=(
v) P(at least one head)=p(1 or2 or3 head)
=p(1)+p(2)+p(3)
=(
vi) P(no head)=1-P(at least one head occurs)
=1 -

Example 2

The probability that omweri goes to Nakuru is , if he goes to Nakuru, the probability that he
will see flamingo is . if he doesn‘t go to Nakuru to Nakuru, the probability that he will see a
flamingo is . Find the probability that;

a) Omweri will go to nakuru and see Flamingo


b) Omweri will not go to Nakuru yet will see a Flamingo
c) Omweri will see a flamingo.
Solution
Let N stand for going to Nakuru, N’ stand for not going to Nakuru, let F stand for seeing a
flamingo and F’ stands for not seeing a Flamingo

Mr. Amos Mising’a ict and liberal studies department 76 | P a g e


a) P(he goes to Nakuru and see Flamingo)
=P(N and F)
=P(N)xP(F)
=

b) P(he does not go to Nakuru and yet sees a flamingo)


=P(N’)xP(F)
=P(N’ and F)
=

c) P(he sees a flamingo) = P(N and F) or P(N’ and F)


=P(N and F) + P(N’ and F)
=

Exercise
1. Ten per cent of transistors manufactured by a company are detective. If five transistors
are chosen at random, find the probability that
a) 1 will be detective
b) 2 will be detective
c) 3 or more will be detective
2. The probability that a day is raining is . The probability 1 carry an umbrella on a raining
day is and that 1 carry an umbrella on a non-rainy day is . Find the probability that ;
a) It will not be raining and 1 carry an umbrella
b) 1 shall carry an umbrella
3. A, B and C are 3 bags. A contains 2 blue beads and 3 red ones, B contains 5 blue beads
and 4 red ones and C contains 3 white beads, A bag is chosen at random and a bead
drawn from it. Find the probability that;
a) Its red
b) Its blue
c) Its white

Questions KNEC Q4 NOV 2009

a) i)Outline three circumstances where Poisson distribution can be applied (3 mks)


ii)a dart player on average hits the eye bull 4 times out of 5shorts. If she makes 4 shorts,
find the probability that at least 3 shorts are missed (4 mks)
b) describe the following terms as used as applied in probability (4 mks)
i) continuous probability distribution
ii) discrete probability distribution

Mr. Amos Mising’a ict and liberal studies department 77 | P a g e


TOPIC 11

LOGIC GATES AND BOOLEAN ALGEBRA


Content:
 Logic gates
o OR
o Inverter (NOT)
o Boolean algebra
o NAND
o NOR
o Implementation (NAND gate and NOR gate)
o Exclusive OR
o Exclusive NOR
 Algebra
o Solving quadratic equation
 Factorisation
 Formula method
 Completing the square method
 Graphical method
o Reducing equation to quadratic
o Solving the reduces quadratic equation
o Solving linear equation with three unknown
o Forming a linear equation with three unknown
o Forming a linear equation with three or more unknown
o Defining a matrix
 Row matrix or column vector
 Rectangular matrix
 Square matrix
 Singular matrix
 Non-singular matrix
 Null matrix
 Identity matrix
o Carrying out matrix operation
 Additional / subtraction
 Compatibility
 Multiplication
 Commutability and non-commutability
 Divisional by scalar
o Determining the inverse of a matrices up to order 3
 Co-factor method
 Row reduction method
o Using matrices to solve simultaneous equation
 Cramer‘s rule
 Inverse method
 Row reduction (Gaussian Elimination)
o Applying the knowledge of matrices in solving real life
problems industrial demands problems

Mr. Amos Mising’a ict and liberal studies department 78 | P a g e


 Out put vector of the economy of say two industries
 Message coding
 Storage of information.

Logic gate
- Logic gate perform basic logical functions and are the fundamental building blocks of
digital integrated circuits
- Most logic gates make an input take an input of two binary values and output as a single
value of 1 or 0
- Each logic gate accepts the NOT gate has two input A and B which can either be 1(True)
or 0 (False). The resulting output is a single value of 1 if the result is true or 0 if the result
is false
Binary (Boolean) Logic
- It deals with binary variables and binary logic functions.
- It has two discrete values
i) 0 – false or open
ii) 1 – true or close
- The basic logical operations are;
a) AND ( . ) , Other notation used are ^
b) OR ( + ), Other notation used are ꓦ
c) NOT ( ‗ ) , Other notation used are x
Logic gate and truth table
1. AND GATE

- The output is ―true‖ when both input are, otherwise the output is false
- The output is 1 only when both input and two are 1

Truth Table

2. OR GATE

Mr. Amos Mising’a ict and liberal studies department 79 | P a g e


- The output is ―True‖ if either or both input is true.
- If both input are false, then the output is false
Truth Table

3. NOT GATE (LOGICAL INVERTER)

- It has only one input. It reverse the logic gate


- If the input is 1, the output is 0, and vice verser

Truth Table

- The basic rule for simplifying and combining logic gate are called Boolean algebra
in honour of George Boole (1815 – 1864)

4. NAND GATE

- The output is ‗false‘ if both input are True, Otherwise the output is True
- NAND Gate is Not associative
- The NAND Gate operates as AND Gate followed by NOT Gate. It acts in a manner of
the logical operation ―and‖ followed by Notation

Truth table

5. NOR GATE

Mr. Amos Mising’a ict and liberal studies department 80 | P a g e


- The NOR Gate is a combination of OR Gate followed by an inverter.
- Its output is ―True‖ if both input are ―False‖ otherwise, the output is false
- 2 input NOR (NOT – OR operation)
- NOR Gate is not associative

Truth table

6. X OR GATE (EXCLUSIVE – OR)

- The output is 1 if any input is one (1) and the other input is zero (0) respectively
Truth table

7. XNOR GATE (EXCLUSIVE –NOR)


- 2 input XNOR

- The XNOR (exclusive –NOR) gate is a combination XOR gate followed by an


‗inverter‘.
- The output is ―True‖ if the inputs are the same, and ―false‖ if the inputs are different
- NB output is 1 if both input are 1, or both input are 0

Truth Table

The NAND and NOR gates are called universal functions since with either one the AND and
OR functions and NOT can be generated.

Mr. Amos Mising’a ict and liberal studies department 81 | P a g e


1. Questions KNEC Q7 NOV 2019
a) Define the term logic gate as used in digital systems (2 mks)
b) With the aid of truth tables comprising only two inputs, explain each of the following
logic gates: (12 mks)
i) OR gate
ii) AND gate
iii) XOR gate
2. Question KNEC Q2 d (i) NOV 2017
i) Figure 1 shows logic circuits. Draw a truth table for the outputs W, X, and Z (5 mks)

ii) Prove that (A*B)*(A +B)=0 (3mks)

Mr. Amos Mising’a ict and liberal studies department 82 | P a g e

You might also like