0% found this document useful (0 votes)
14 views37 pages

Matrices Part 1

Uploaded by

alaayousefmm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views37 pages

Matrices Part 1

Uploaded by

alaayousefmm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 37

Linear Algebra: Matrices and

Vectors – Part 1

By Dr. Samer Awad


Assistant professor of biomedical engineering
The Hashemite University, Zarqa, Jordan
[email protected]
June 9, 2024 :Last update
2 [email protected] June 9, 2024

Matrices
• A matrix is a rectangular array of numbers or
functions which we will enclose in brackets.

• The numbers (or functions) are called entries or,


less commonly, elements of the matrix.
3 [email protected] June 9, 2024

Linear Systems
• Linear systems is a major application of matrices,
example:

• where x1, x2, x3 are the unknowns. We form the


coefficient matrix “A” (a22 = zero):
4 [email protected] June 9, 2024

Linear Systems
• We form another matrix, the augmented matrix of
the system “”:

, remember:

• Matrix operations will be used LATER to find the


values for x1, x2, x3 (the solution for the linear
system).

• For the previous system:


5 [email protected] June 9, 2024

General Concepts and


Notations
• We shall denote matrices by capital boldface letters
• or by writing the general entry in brackets .
• m x n matrix is a matrix with m rows and n columns .
• m x n is called the size of the matrix.
6 [email protected] June 9, 2024

General Concepts and


Notations
• The following matrices have the sizes 2 x 3, 3 x 3,
2 x 2, 1 x 3, and 2 x 1 respectively.
7 [email protected] June 9, 2024

General Concepts and


Notations
• If m=n, we call an n x n square matrix.

• Then its diagonal containing the entries a11, a22, …, ann


is called the main diagonal of .

• If m≠n, we call an n x n rectangular matrix.

• A vector is a matrix with only one row or column.

• Its entries are called the components of the vector.


8 [email protected] June 9, 2024

General Concepts and


Notations
• We shall denote vectors by lowercase boldface letters
• or by its general component in brackets .
• row vector

• column vector:
9 [email protected] June 9, 2024

Matrix Addition and Scalar


Multiplication
10 [email protected] June 9, 2024

Matrix Addition and Scalar


Multiplication
11 [email protected] June 9, 2024

Matrix Addition and Scalar


Multiplication
12 [email protected] June 9, 2024

Rules for Matrix Addition


13 [email protected] June 9, 2024

Rules for Matrix Scalar


Multiplication
14 [email protected] June 9, 2024

Matrix Multiplication
• The entry cjk is obtained by multiplying each entry in
the row of A by the corresponding entry in the
column of B and then adding these n products.
15 [email protected] June 9, 2024

Matrix Multiplication
• Matrix multiplication means multiplication of matrices
by matrices.
16 [email protected] June 9, 2024

Matrix Multiplication
• Matrix multiplication means multiplication of matrices
by matrices.
17 [email protected] June 9, 2024

Example1: Matrix Multiplication


18 [email protected] June 9, 2024

Example2,3: Matrix Multiplication


19 [email protected] June 9, 2024

Example4: Matrix Multiplication


• This is illustrated by the previous examples where
one of the two products is not even defined OR the
two products have different sizes. But it also holds for
square matrices.

• Note that this also shows that AB=0 does not


necessarily imply BA=0 or A=0 or B=0.
20 [email protected] June 9, 2024

Matrix Multiplication Rules

(b) Associative law.


(c) and (d) Distributive laws.
21 [email protected] June 9, 2024

Matrix Multiplication in Matlab


>> a=[1 2; 3 4]
a=
1 2
3 4

>> b=[1 0; 1 0]
b=
1 0
1 0

>> a*b
ans =
3 0
7 0
22 [email protected] June 9, 2024

Matrix Multiplication in Matlab


>> a*b
ans =
3 0
7 0

>> b*a
ans =
1 2
1 2
23 [email protected] June 9, 2024

Matrix Multiplication in Matlab


>> c=[a,b]
c=
1 2 1 0
3 4 1 0

>> a*c
ans =
7 10 3 0
15 22 7 0

>> c*a
??? Error using ==> mtimes
Inner matrix dimensions must agree.
24 [email protected] June 9, 2024

Matrix Multiplication: Method #2


• Since matrix multiplication is a multiplication of rows
into columns, we can write the defining formula more
compactly as:

where aj is the row vector of A and bk is the column


vector of B:
25 [email protected] June 9, 2024

Example: Matrix Multiplication:


Method #2
26 [email protected] June 9, 2024

Matrix Multiplication: Method #3


• Parallel processing of products on the computer is
facilitated by a variant method #1 for computing
C=AB.
• In this method, A is used as given, B is taken in terms
of its column vectors, and the product is computed
columnwise:

• Columns of B are then assigned to different


processors, which simultaneously compute the
columns of the product matrix Ab1, Ab2, etc.
27 [email protected] June 9, 2024

Example: Matrix Multiplication:


Method #3
28 [email protected] June 9, 2024

Motivation of Multiplication
by Linear Transformations
• Let us now motivate the matrix multiplication by its
use in linear transformations. For variables these
transformations are of the form:

• In these equations, we may relate an x1x2-coordinate


system to a y1y2-coordinate system in the plane:
29 [email protected] June 9, 2024

Motivation of Multiplication
by Linear Transformations
• Now suppose further that the x1x2-system is related to
a w1w2-system by another linear transformation:

• Then the y1y2-system is related to the w1w2-system


indirectly via the x1x2-system, which is a linear
transformation:
30 [email protected] June 9, 2024

Motivation of Multiplication
by Linear Transformations
• Substituting x into y:

• Comparing this with y=Cw:

 C=AB
31 [email protected] June 9, 2024

Transposition
• It provides a transition from row vectors to column
vectors and vice versa.
32 [email protected] June 9, 2024

Examples: Transposition
33 [email protected] June 9, 2024

Rules of Transposition

• Note that in (d) the transposed matrices are in


reversed order.
34 [email protected] June 9, 2024

Symmetric and Skew-


Symmetric Matrices
• Symmetric and Skew-Symmetric Matrices are square
matrices whose transpose equals the matrix itself or
minus the matrix.

• Example:
35 [email protected] June 9, 2024

Triangular Matrices
• Upper triangular matrices: square matrices with
nonzero entries only on and above the main diagonal.
• Lower triangular matrices: square matrices with
nonzero entries only on and below the main diagonal.
• Any entry on the main diagonal of a triangular matrix
may be zero or not.
• Example:
36 [email protected] June 9, 2024

Diagonal, Scalar, & Unit


Matrices
• Diagonal matrix: square matrix that can have nonzero
entries only on the main diagonal.

• Scalar matrix : diagonal matrix with all diagonal entries


having the same value . Why call is scalar matrix?

• Unit or identity matrix : scalar matrix with . Why call is


unit matrix?
37 [email protected] June 9, 2024

Example: Diagonal, Scalar, &


Unit Matrices

You might also like