Page 125 - Touhpad Ai
P. 125
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
u Recommender systems: They use matrices to relate between users and the purchased or viewed item(s).
u Natural Language Processing: In NLP, vectors represent the distribution of a particular word in a document. Vectors
are one-dimensional matrices.
Operations on Matrices
In matrix operations, you perform mathematical operations like addition, subtraction, and transposition on matrices.
These operations help in solving complex problems in various fields, such as computer science, engineering, and physics.
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 40 3 4
AB 6 2 87 4 15
7 3 54 10 9
3 x 2
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
2 3 0 1 0 2
23 23
13 2 2 33 24 0
AB
1 30
2 () 0 2 3 3 2 23
Multiplication of a Matrix by a Scalar
A scalar is any number. So, if A is a matrix and k is a scalar, then kA is another matrix which is obtained by multiplying
each element of A by the scalar k. For example:
A = 15 3 k = 3
2 47
1 3 5 3 3 3 × × × 3 15 9
k A 3A = ⇒
=
×
×
×
2 34 3 7 3 6 12 21
Mathematics for AI 123

