Vectors & Matrices: Dr. Safaa O. Al-Mamory
Vectors & Matrices: Dr. Safaa O. Al-Mamory
Vectors & Matrices: Dr. Safaa O. Al-Mamory
Department of Software 5
Vector Operations (Cont.)
The dot product or inner product of the above vectors u and
v is denoted and defined by
Department of Software 6
Vector Operations (Example)
Department of Software 7
Matrix Addition and Scalar Multiplication
Solve:
1 2 1 1
2 X
3
X
3 4 2 3
Matrix Multiplication
Definition: If A is an mn matrix, and B is an nr
matrix, then the product AB is an mr matrix, with
the (i, j) entry being the dot product of the ith row
of A and the jth column of B.
I.e.: [aij]mn[bij]nr = [k aikbkj]mr
The identity matrix In is an nn matrix [ij] with
ij = 1 (if i = j) and 0 otherwise.
The power of an nn matrix A is defined by:
Ak = AA A (k factors) with A1 = A and A0 = In.
Matrix Multiplication (Example)
Example 1 (One dimension multiplication)
Department of Software 13
Matrix Multiplication (Example)
Ex:
Department of Software 14
Example
1 2 3 1
Let A , B
3 6 6 2
Find AB and BA.
Notes:
In general, AB BA.
AB = O does not always imply that
one of A and B is O.
Properties of Matrix Multiplication
Let A, B, and C be matrices of suitable sizes,
and let In be the nn identity matrix. Then
(AB)C = A(BC)
A(B + C) = AB + AC
(A + B)C = AC + BC
c(AB) = (cA)B = A(cB)
ImA = A = AIn, if A is mn
Example
Write down the component equations
resulting from the matrix equation:
x
1 2 3 7
4 5 6 y 8
z
Note:
Any system of m linear equations in n
unknowns can be written as a matrix
equation of the form: Amnxn1 = bm1
Example: Perform the multiplication:
6 5 4
1 0 1 2 3 3 2 1
0
1 4 5 6 1 0 0
0 0 0 0 0 0 1 0
0 0 1
Note: We can use block multiplication by
partitioning the matrices into matching
blocks as follows: I 2 A23 B23
O
1 2 O13 I 3
Example
Let
1 1
A
1 1
Department of Software 24
Determinant of a Matrix (Cont.)
Department of Software 25
Determinant of a Matrix (Cont.)
Determinants of non square matrices are not defined.
If any two rows or columns of a square matrix A are
identical, det A = 0.
Department of Software 26
Matrix Inversion
A square matrix A is said to be invertible if there exists a
matrix B such that
AB = BA = I, (the identity matrix).
Example:
Department of Software 27
Matrix Inversion (2 × 2 Matrix)
Consider an arbitrary 2 × 2 matrix
Then,
Example:
Department of Software 28
Matrix Inversion (3 × 3 Matrix)
Department of Software 29
Matrix Inversion (3 × 3 Matrix)
Department of Software 30
Matrix Inversion (3 × 3 Matrix)
Department of Software 31
Matrix Inversion (3 × 3 Matrix)
Department of Software 32
Matrix Inversion (3 × 3 Matrix)
a
Department of Software 33
References
1. Seymour Lipschutz, and Marc Lipson, “Schaum’s
Outlines: Discrete Mathematics,” 3rd edition, McGraw-
Hill, 2007.
2. Ralph P. Grimaldi, Discrete And Combinatorial
Mathematics, An Applied Introduction, 5th Edition,
Pearson Education, Inc., 2004.
3. Thomas Koshy, Discrete Mathematics with Applications,
Elsevier Press, 2004.
4. Wafik, Introduction to Matrix Operations and Algebra,
ppt slides, 2009.
Department of Software 34
Thank You for
Listening.
Department of Software 35