Page 165 - Artificial Intellegence_v2.0_Class_11
P. 165
• Image Processing: Digital images can be represented using matrices. In the following figure, each box
is and appears transparent or represented in the corresponding matrix with either a “1” or a “0”. A zero
means the box contains nothing white, while a one indicates that the box is filled (in this case it is filled
with black).
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 0
0 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 0
0 1 1 0 1 1 0 0 0 0 0 1 1 0 1 1 0
0 1 1 0 0 1 1 0 0 0 1 1 0 0 1 1 0
0 1 1 0 0 0 1 1 1 1 1 0 0 0 1 1 0
0 1 1 0 0 0 0 1 1 1 0 0 0 0 1 1 0
0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0
0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0
0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0
0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0
0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0
0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0
0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
• Recommender Systems: They use matrices to relate between users and the purchased or viewed item(s).
• Natural Language Processing: In NLP, vectors represent the distribution of a particular word in a document.
Vectors are one-dimensional matrices.
Operations on Matrices
Addition of Matrices
The sum of two matrices is a matrix obtained by adding the corresponding elements of the given matrices. Also, the
two matrices have to be of the same order. For example:
2 4 1 0
A = 6 8 B = − 2 7
7 5 32 3 4 32
×
×
21 4 0 + 3 4
+
+
A B = 6+− 8 7 ⇒ 4 15
+
( ) 2
10 9
+
+
7 3 54
Difference of Matrices
If A and B are two matrices of the same order, then the difference A – B is defined as a matrix where each element is
obtained by subtracting the corresponding elements (a – b ). For example:
ij ij
12 3 3 2 3−
A = B =
230 23 − 1 0 − 2 23
×
×
13 2 −− 3 3 2 40−
−
−
( ) 2
AB −= ⇒
( ) 2
− − − 0 − − 3 32 23
2 ( 1) 3 0
×
Transpose of a Matrix
T
A matrix obtained by interchanging the rows and columns of a matrix. Transpose of a matrix A is denoted by A’ or A .
Maths for AI 163

