0% found this document useful (0 votes)
44 views325 pages

Linear Algebra

The document provides an overview of Linear Algebra, focusing on its fundamental concepts such as linear equations, systems of linear equations, matrices, and transformations. It covers topics like unique and infinite solutions, row operations, and the properties of matrices. Additionally, it explains homogeneous systems and the operations involved with matrices, including addition and scalar multiplication.

Uploaded by

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

Linear Algebra

The document provides an overview of Linear Algebra, focusing on its fundamental concepts such as linear equations, systems of linear equations, matrices, and transformations. It covers topics like unique and infinite solutions, row operations, and the properties of matrices. Additionally, it explains homogeneous systems and the operations involved with matrices, including addition and scalar multiplication.

Uploaded by

aymenahmed630
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Linear Algebra

for data science

Eng. Fawzia faraag


What is Linear Algebra?

• It is a branch of mathematics concerned with the study of


linear systems, vector spaces (or linear spaces), and linear
transformations

© Ahmed Hagag Linear Algebra 2


Topic Coverage
• Systems of Linear Equations
• Matrices
• Determinants
• Vector Spaces
• Linear Transformations
• Eigenvalues and Eigenvectors

Linear Algebra 3
What is Linear Equation?

• Linear equations have no products or roots of variables and no


variables involved in trigonometric, exponential, or logarithmic
functions. Variables appear only to the first power.

© Ahmed Hagag Linear Algebra 2


What is Linear Equation?

© Ahmed Hagag Linear Algebra 3


Systems of Linear Equations

© Ahmed Hagag Linear Algebra 4


Systems of Linear Equations

© Ahmed Hagag Linear Algebra 5


Systems of Linear Equations
Systems of Two Equations in Two Variables

Unique solution Infinitely many solutions No solution

© Ahmed Hagag Linear Algebra 6


Systems of Linear Equations
Systems of Three Equations in Three Variables

Unique solution Infinitely many solutions No solution

© Ahmed Hagag Linear Algebra 7


Systems of Linear Equations

© Ahmed Hagag Linear Algebra 8


Systems of Linear Equations

© Ahmed Hagag Linear Algebra 9


Systems of Linear Equations

Consider the systemof 3 equations in 4 unknowns:


x1  3x2  x3  x4  7
x1  2x2  2x4  9
3x1  x2  4x3  7

The matrix form is AX  B,


 x1 
1 3 1 1 x   7
where A  1 0  2, X   , B   9 
2
2
 x3 
3 1 4 0 x   7
 4
1 3 1 1 7
The augmented matrix is A B 1 2 0 2 9 
3 1 4 0 7
© Ahmed Hagag Linear Algebra 10
Systems of Linear Equations

Elementary Row Operations


1. Interchange two rows.
2. Multiply a row by a nonzero constant.
3. Add a multiple of a row to another row.

© Ahmed Hagag Linear Algebra 11


Systems of Linear Equations

𝟏
𝑹𝟏 = 𝑹𝟏
𝟐

© Ahmed Hagag Linear Algebra 12


Systems of Linear Equations

𝑹𝟑 = −𝟐𝑹𝟏 + 𝑹𝟑

© Ahmed Hagag Linear Algebra 13


Systems of Linear Equations

3 6 9 1 1 2  1 1 1 2
  R1 R 2   1 2 3
R2
e.g. A  1 1 2    3 6 9  3
 

2 0 3 2 0 3 2 0 3

1 1 2
R3R32R11 2 3  B.
0  2 1

The matrix B is row equivalent to the matrices A.

© Ahmed Hagag Linear Algebra 14


Systems of Linear Equations

Row-Echelon Form and Reduced Row-Echelon Form


A matrix in row-echelon form has the properties below.
1. Any rows consisting entirely of zeros occur at the bottom of the matrix.
2. For each row that does not consist entirely of zeros, the first nonzero entry
is 1 (called a leading 1).
3. For two successive (nonzero) rows, the leading 1 in the higher row is farther
to the left than the leading 1 in the lower row.
A matrix in row-echelon form is in reduced row-echelon form when every
column that has a leading 1 has zeros in every position above and below its
leading 1.

© Ahmed Hagag Linear Algebra 2


Systems of Linear Equations

Determine whether each matrix is in row-echelon form. If it is, determine


whether the matrix is also in reduced row-echelon form.

© Ahmed Hagag Linear Algebra 3


Systems of Linear Equations

Determine whether each matrix is in row-echelon form. If it is, determine


whether the matrix is also in reduced row-echelon form.

© Ahmed Hagag Linear Algebra 4


Systems of Linear Equations

row-echelon form reduced row-echelon form


Gaussian Elimination Gauss-Jordan Elimination

© Ahmed Hagag Linear Algebra 5


Systems of Linear Equations
𝑨𝑿 = 𝑩

Unique solution Infinitely many solutions No solution

Number of leading 1’s = Number of leading 1’s < The system is


number of unknowns inconsistent (0 = 1!!!)
number of unknowns
(variables) (variables)

© Ahmed Hagag Linear Algebra 2


Systems of Linear Equations

© Ahmed Hagag Linear Algebra 3


Systems of Linear Equations

© Ahmed Hagag Linear Algebra 4


Systems of Linear Equations

© Ahmed Hagag Linear Algebra 5


Systems of Linear Equations

Example 2

© Ahmed Hagag Linear Algebra 6


Systems of Linear Equations

Example 2

© Ahmed Hagag Linear Algebra 7


Systems of Linear Equations

© Ahmed Hagag Linear Algebra 2


Systems of Linear Equations

© Ahmed Hagag Linear Algebra 3


Systems of Linear Equations

© Ahmed Hagag Linear Algebra 4


Systems of Linear Equations

© Ahmed Hagag Linear Algebra 5


Systems of Linear Equations

© Ahmed Hagag Linear Algebra 6


Systems of Linear Equations

© Ahmed Hagag Linear Algebra 2


Systems of Linear Equations

© Ahmed Hagag Linear Algebra 3


Systems of Linear Equations

© Ahmed Hagag Linear Algebra 4


Systems of Linear Equations

© Ahmed Hagag Linear Algebra 5


Systems of Linear Equations

© Ahmed Hagag Linear Algebra 6


Systems of Linear Equations

© Ahmed Hagag Linear Algebra 7


Systems of Linear Equations

HOMOGENEOUS SYSTEMS OF LINEAR EQUATIONS


Systems of linear equations in which each of the constant terms is zero are
called homogeneous.

The homogenous system is always consistent (has solution) which is either


of following: The unique solution (𝑿 = 𝑶, Zero solution), called the trivial
solution (or obvious), or an infinitely many solutions (including the trivial
solution), called the nontrivial solution.
© Ahmed Hagag Linear Algebra 2
Systems of Linear Equations

Consider the homogenoussystem of equations :


x1  3x2  x3  x4  0
x1  2x2  2x4  0
3x1  x2  4x3  0
The matrix form is AX  O,
 x1 
1 3 1 1 x  0
where A  1 0  2, X    and O  0
2
2
 x3 
3 1 4 0   0
 
 3
x
1 3 1 1 0
The augmented matrix is A O   1 2 0 2 0 
3 1 4 0 0
© Ahmed Hagag Linear Algebra 3
Systems of Linear Equations

Example :

1 1 1 1
Let A  1 0 0 1.
1 2 1 0

Solve the homogeneous linear system AX  O.

Find one specific nonzerosolution.

© Ahmed Hagag Linear Algebra 4


Systems of Linear Equations

© Ahmed Hagag Linear Algebra 5


Systems of Linear Equations

- For the system of linear equations AX = B (B ≠ O),


If X1 and X2 are two solutions, then rX1 + sX2 , r + s = 1, is also a solution.
e.g. If X1 and X2 are two solutions to the system of linear equations AX = B (B ≠ O),
then 3X1 − 2X2 and 0.25X1 + 0.75X2 are also solutions.
e.g. If X1, X2 and X3 are solutions to the system of linear equations AX = B (B ≠ O),
then 3X1 + 2X2 − 4X3 is also a solution (as 3 + 2 − 4 = 1).

- For the homogenous system of linear equations AX = O,


If X1 and X2 are two solutions, then rX1 + sX2 is also a solution.
e.g. If X1 and X2 are two solutions, then 3X1 + 2X2 and 10X1 − 4X2 are also solutions.

© Ahmed Hagag Linear Algebra 6


Matrices

It is standard mathematical convention to represent matrices in any one


of the three ways listed below.
1. An uppercase letter such as 𝐴, 𝐵, or 𝐶
2. A representative element enclosed in brackets, such as [𝑎𝑖𝑗], [𝑏𝑖𝑗], or [𝑐𝑖𝑗]
3. A rectangular array of numbers
Example : If
2 5 3 7
a  3
2 3 1 0  13
A
6 1 9 4  a34  4
6 7 
 4 0

© Ahmed Hagag Linear Algebra 2


Matrices
(1) Square matrix : (#rows  #columns) (2) Upper triangular matrix : (3) Lower triangular matrix :
 3 1  3 3 1  3 0
2  3 0
4 0 0 7  2
0
   4

4

1 5 6  0 0 6  2 7  6 
Main diagonal
(5) Identity matrix :

1 0 0 (6) Zero matrix :


(4) Diagonal matrix : 1 0 0 1 0
I2    3 
, I  
0 1 0 0
3 0 0 0 0 1 0 0
 4 0 
O22    , O32  0 0
0 0 0 0 0
0 0  6 (7) Column matrix (n  vector) :

 2 (8) Row matrix (n  vector) :


 4 is a 3 - vector
column vector
 
 6  3 5 8 is a 3 - vector
row vector

© Ahmed Hagag Linear Algebra 3


Operations with Matrices

Definition of Matrix Addition


If A = [ 𝑎 𝑖𝑗] and B = [𝑏𝑖𝑗] are matrices of size m × n,
then their sum is the m × n matrix A + B = [𝑎𝑖𝑗 + 𝑏𝑖𝑗].
The sum of two matrices of different sizes is undefined.

© Ahmed Hagag Linear Algebra 4


Operations with Matrices

Definition of Scalar Multiplication


If A = [ 𝑎 𝑖𝑗] is an m × n matrix and c is a scalar,
then the scalar multiple of A by c is the m × n matrix cA = [𝑐𝑎𝑖𝑗].

© Ahmed Hagag Linear Algebra 5


Operations with Matrices

© Ahmed Hagag Linear Algebra 6


Properties of Matrix Operations

Note : For r, s  R,
 A B  B A  (r  s) A  rA  sA
 A  (B  C)  ( A  B)  C  r( A  B)  rA  rB
 AO  O  A  A  r(sA)  (rs) A
 A A  A A  O 1A  A
Zero matrix

© Ahmed Hagag Linear Algebra 7


Operations with Matrices

Definition of Matrix Multiplication

© Ahmed Hagag Linear Algebra 2


Operations with Matrices

Matrix Multiplication

© Ahmed Hagag Linear Algebra 3


Operations with Matrices

© Ahmed Hagag Linear Algebra 4


Operations with Matrices

Example 1:
2 1 4 6
If A    and B   
,
3 0 2 1 
 (2  4  1 2) (2  6  1 -1)  10 11
then AB  (3 6  0  -1)  12 18
 (3 4  0  2)
   

© Ahmed Hagag Linear Algebra 5


Operations with Matrices

© Ahmed Hagag Linear Algebra 6


Operations with Matrices

© Ahmed Hagag Linear Algebra 7


Operations with Matrices

1 1 
Example 4 : If A    , find A2
and A 4
.
2  3

1 1  1 1
A  A A    3 2  3
2
2   
 1 2

 4 7
 

A4  A2  A2  ?

© Ahmed Hagag Linear Algebra 8


Properties of Matrix Operations

Note:
 A(BC)  ( AB)C
 A(B  C)  AB  AC Zero matrix
 ( A  B)C  AC  BC
 AIn  A, Ais an m  n matrix • AO = OA = O
 Im A  A, Ais an m  n matrix If I is identity matrix and (I )n = I.
 An  A A … A
n times
Identity matrix

© Ahmed Hagag Linear Algebra 9


Operations with Matrices

© Ahmed Hagag Linear Algebra 10


Operations with Matrices

x y
Let B  .
z
 w

 1 1  x y  x

y  1 1
AB  BA    z 
 0 1 w  z w 
 0 1

x  z y  w x x  y
   z
 z w   z  w 

x  z  x
  y  w  x  y 
zz
xw
z0
z 0   x  w  t  B   t

 y  r
0

r

t
, t, r  R.
w  z  w
© Ahmed Hagag Linear Algebra 11
Operations with Matrices

True or False

If 𝐴𝐶 = 𝐵𝐶, then 𝐴 = 𝐵.

© Ahmed Hagag Linear Algebra 12


Operations with Matrices

True or False

If 𝐴𝐶 = 𝐵𝐶, then 𝐴 = 𝐵.

© Ahmed Hagag Linear Algebra 13


The Transpose of A Matrix

The transpose of a matrix is formed by writing its rows as columns.

© Ahmed Hagag Linear Algebra 2


The Transpose of A Matrix

The transpose of a matrix is formed by writing its rows as columns.

 3
 3 4 3  2
If A   ,then A  
T
 If B  3  2 5, then BT   2
  2 5  4 5   5

1 1 1 1  1 3 2 7
3 4 5 6 1 4  2 8
C   CT  
2  2 2  2  1 5 2 9
7 0 1 
 8 9  6 2 
0

© Ahmed Hagag Linear Algebra 3


Properties of Transposes

If A and B are matrices (with sizes such that the matrix operations are
defined) and c is a scalar, then the properties below are true. its rows as
columns.

If I is identity matrix and ( I )T = I.

© Ahmed Hagag Linear Algebra 4


Symmetric Matrices

A square matrix A  [a ij ] is said to be symmetric if AT  A


(i.e. aij  a ji , 1  i  n, 1  j  n).
 If A is an n  n matrix, then A  A T and AA T
 1 1 3 4
1 6
are both symmetric:
8 5
C ,
 3 5 9  2 ( A  AT )T  AT  ( AT )T  AT  A  A  AT .
 4
6 2 0
  ( AA T ) T  ( A T ) T A T  AA T .
 1 1 3 4
1 6  If Aand B are symmetric matrices, then
8 5 
C 
T  AB  BA is also symmetric:
 3 5 9  2
 4
6 2 0 ( AB  BA) T  ( AB) T  (BA) T  B T A T  A T B T
 

CT  C C is symmetric.  BA  AB  AB  BA.

© Ahmed Hagag Linear Algebra 5


Skew Symmetric Matrices

A square matrix A  [aij ] is said to be skew symmetric if


AT   A (i.e. aij  a j i , 1  i  n, 1  j  n).

 0 1  3 4  If A is an n  n matrix, then A  AT
 1 0 5  6
C ,
is skew symmetric:
 3 5 0  2
 4 
6 2 0 ( A  AT )T  AT  ( AT )T  AT  A  ( A  AT ).
 
 0 1 3  4
 1 0  5 6   If Aand B are skew symmetric, then
C 
T

 3 5 0 2 AB  BA is symmetric :
 4 
  6  2 0 
CT  C 
( AB  BA)T  ( AB)T  (BA)T  BT AT  AT BT
 (B)( A)  ( A)(B)  BA  AB  AB  BA.
C is skew symmetric.

© Ahmed Hagag Linear Algebra 6


The Inverse of a Matrix

Definition of the Inverse of a Matrix


An n × n matrix A is invertible (or nonsingular) when there exists an n × n matrix
B such that AB = BA = In , where In is the identity matrix of order n. The matrix B
is the (multiplicative) inverse of A.

A matrix that does not have an inverse is noninvertible (or singular).

The inverse of 𝐴 is denoted by 𝐴−1 .

© Ahmed Hagag Linear Algebra 2


The Inverse of a Matrix

© Ahmed Hagag Linear Algebra 3


The Inverse of a Matrix

Finding the Inverse of a Matrix


Let A be a square matrix of order n.
1. Write the n × 2n matrix that consists of A on the left and the n × n identity
matrix I on the right to obtain [A I]. This process is called adjoining
matrix I to matrix A.
2. If possible, row reduce A to I using elementary row operations on the entire
matrix [A I]. The result will be the matrix [I A−1]. If this is not
possible, then A is noninvertible (or singular).
3. Check your work by multiplying to see that AA−1 = I = A−1A.

© Ahmed Hagag Linear Algebra 4


The Inverse of a Matrix

© Ahmed Hagag Linear Algebra 5


The Inverse of a Matrix

© Ahmed Hagag Linear Algebra 6


The Inverse of a Matrix

© Ahmed Hagag Linear Algebra 7


The Inverse of a Matrix

© Ahmed Hagag Linear Algebra 8


The Inverse of a Matrix

adjoint of 𝑨

© Ahmed Hagag Linear Algebra 9


Properties of Inverse

Note:
• The inverse of a matrix is unique.
• If A and B are nonsingular matrices, then
o A-1 is nonsingular and (A-1)-1 = A.
o AT is nonsingular and (AT )-1 = (A-1)T.
o AB is nonsingular and (AB)-1 = B-1A-1 .
o A is nonsingular and (An)-1 = (A-1)n .
1
o A is nonsingular and (nA)-1 = n A-1 .
o I is identity matrix and ( I )-1 = I.

© Ahmed Hagag Linear Algebra 10


Properties of Inverse

Note:
• If A and B are nonsingular matrices, then
o (A+B)-1 ≠ A-1 + B-1
o (A+B)-1 = A-1 − A-1BA-1 + A-1BA-1BA-1 − A-1BA-1BA-1BA-1 +…

© Ahmed Hagag Linear Algebra 11


Properties of Inverse

True or False

If A and B are invertible square matrices then (A+B)-1 = A-1 + B-1

© Ahmed Hagag Linear Algebra 12


Properties of Inverse

True or False

If A and B are invertible square matrices then (A+B)-1 = A-1 + B-1

© Ahmed Hagag Linear Algebra 13


Properties of Inverse

1 1 0 2 3
Example : Let A  1 0 0 and B  1 0.
1 2 1 0 2

(i) Find ( A2 )1.

(ii) Find the matrix X such that AT X  B.

(iii) Find the matrix Y such that YA  BT .

© Ahmed Hagag Linear Algebra 2


Properties of Inverse

© Ahmed Hagag Linear Algebra 3


Properties of Inverse

© Ahmed Hagag Linear Algebra 4


Properties of Inverse

© Ahmed Hagag Linear Algebra 5


Periodic Matrix

In linear algebra, a periodic matrix is a square matrix 𝑨 that satisfies the


condition:
𝑨𝒌 = 𝑰, for 𝑘 ∈ 𝑍+(positive integers)
The smallest such 𝑘 is the order.

Example:
0 1 1 0
𝐴= → 𝐴4 = =𝐼
−1 0 0 1
∴ 𝐴 is periodical with order = 4

© Ahmed Hagag Linear Algebra 2


Periodic Matrix

Example: Prove that the following matrix is periodical and find the order.
0 0 1
𝐴= 1 0 0
0 1 0

© Ahmed Hagag Linear Algebra 3


Periodic Matrix

0 0 1
𝐴= 1 0 0
0 1 0

© Ahmed Hagag Linear Algebra 4


Adjoint Matrix

The adjoint (or adjugate) matrix of an n×n matrix is the transpose of the
cofactor matrix.

Steps: Given matrix 𝐴𝑛×𝑛.


1 Find the minor 𝑀𝑖𝑗 for each element 𝐴 𝑖𝑗.
2 Compute the cofactor matrix 𝐶.
3 The adjoint matrix adj 𝐴 = 𝐶𝑇 .

© Ahmed Hagag Linear Algebra 2


Adjoint Matrix

𝐴11 𝐴12 𝐴13


Steps: Given matrix 𝐴3×3 = 𝐴21 𝐴22 𝐴23 .
𝐴31 𝐴32 𝐴33
1- Find the minor 𝑀𝑖𝑗 for each element 𝐴 𝑖𝑗.
𝐴22 𝐴23 𝐴11 𝐴12
𝑀11 = , … , 𝑀23 =
𝐴32 𝐴33 𝐴31 𝐴32

𝐶11 𝐶12 𝐶13


2- Compute the cofactor matrix 𝐶 = 𝐶21 𝐶22 𝐶23 , where 𝐶𝑖𝑗 = −1 𝑖+𝑗
𝑀𝑖𝑗
𝐶31 𝐶32 𝐶33
𝐶11 = −1 2𝑀11, … , 𝐶12 = −1 3𝑀12

3- The adjoint matrix adj 𝐴 = 𝐶𝑇 .


© Ahmed Hagag Linear Algebra 3
Adjoint Matrix

Example: Find the adjoint of matrix 𝐴.


1 1 0
𝐴= 2 1 1
1 0 2

© Ahmed Hagag Linear Algebra 4


Adjoint Matrix
1 1 0
𝐴= 2 1 1
1 0 2

© Ahmed Hagag Linear Algebra 5


Adjoint Matrix
1 1 0
𝐴= 2 1 1
1 0 2

© Ahmed Hagag Linear Algebra 6


Determinants

Definition of the Determinant of a 2 × 2 Matrix


Every square matrix can be associated with a real number called its
determinant.
The determinant of the matrix Example : If
2 5 3 7
2 3 1 0 
A
6 1 9 4
6 
7
 4 0

© Ahmed Hagag Linear Algebra 2


Determinants

The Determinant of a 3 × 3 Matrix


+ − +
a11 a12 a13 
The determinan t of the matrix A  a 21 a22 a23  is given by

a31 a32 a33 
a11 a12 a13
a22 a23 a21 a23 a21 a22
A  det( A)  a21 a22 a23  a11  a12  a13 .
a32 a33 a31 a33 a31 a32
a31 a32 a33

Note that odd positions (where i + j is odd) have negative signs, and even positions
(where i + j is even) have positive signs.

© Ahmed Hagag Linear Algebra 3


Determinants

Minors and Cofactors of a Square Matrix

Note that odd positions (where i + j is odd) have negative signs, and even positions
(where i + j is even) have positive signs.

© Ahmed Hagag Linear Algebra 4


Determinants

Minors and Cofactors of a Square Matrix

Note that odd positions (where i + j is odd) have negative signs, and even positions
(where i + j is even) have positive signs.

© Ahmed Hagag Linear Algebra 5


Determinants

Example

© Ahmed Hagag Linear Algebra 6


Determinants

© Ahmed Hagag Linear Algebra 7


Determinants

Example

© Ahmed Hagag Linear Algebra 8


Determinants

© Ahmed Hagag Linear Algebra 9


Determinants

The determinant of a 3 × 3 matrix (alternative method)

© Ahmed Hagag Linear Algebra 10


Determinants

Example

© Ahmed Hagag Linear Algebra 11


Determinants

© Ahmed Hagag Linear Algebra 12


Properties of Determinants

Determinant of a Triangular Matrix


If A is a triangular matrix of order n, then its determinant is
the product of the entries on the main diagonal. That is,

© Ahmed Hagag Linear Algebra 2


Properties of Determinants

Conditions That Yield a Zero Determinant

© Ahmed Hagag Linear Algebra 3


Properties of Determinants

Determinant of a Transpose
If 𝑨 is a square matrix, then 𝐝𝐞𝐭 𝑨 = 𝒅𝒆𝒕(𝑨𝑻).

© Ahmed Hagag Linear Algebra 4


Properties of Determinants

Notes:
If 𝐴 is an 𝑛 × 𝑛 invertible matrix, then
𝟏
𝐝𝐞𝐭 𝑨−𝟏 =
𝒅𝒆𝒕(𝑨)

If a matrix 𝐵 results from a matrix 𝐴 by interchanging


two rows (columns) of 𝐴, then |𝐵| = −|𝐴|.
1 2 3 4
e.g.  .
3 4 1 2

© Ahmed Hagag Linear Algebra 5


Properties of Determinants

Notes:
If a matrix B is obtained from a matrix A by multiplying one row (column)
of A by a number r , then |B| = r |A|.
10 20 1 2
e.g.  10  (10)(2)  20.
3 4 3 4
If a matrix B is obtained from a matrix A by adding a multiple of one row
(column) of A to another row (column) of A, then |B| = |A|.
1 2
31 42
e.g.   2.
3 4 3 4
R1 10R2
© Ahmed Hagag Linear Algebra 6
Properties of Determinants

Notes:
• |AB| = |A| |B|
• |ABC…| = |A| |B| |C| …|..|
• |An| = |A|n
• If A is an n×n matrix and r is a scalar, then
 |r A| = r n |A| , |r 𝐴−1| = r n / |A| , | 𝑟𝐴 −1| = 1 / (r n |A|)
• A square matrix A is invertible (nonsingular) if and only if |A| ≠ 0
• |A+B| ≠ |A| + |B |

© Ahmed Hagag Linear Algebra 7


Examples

Example 1:
If A and B are 5×5 matrices with |A| = 8 and |B| = 2. Find
(i) |A2| (ii) |−A| (iii) |AT B -1| (iv) |2A-1B 4A|.

(i) A  A  82  64.
2 2

(ii)  A  (1)5 A  8.


1
(iii) A B  A
T
B1
1
 A  4.
T

B
1 4
(iv) 2 A1B4 A  25 A1 B4 A  32 B A  32 B  512.
4

A
© Ahmed Hagag Linear Algebra 8
Examples

Example 2: Answer each of the following as True or False. Justify your answer.
(i) If A and B are n×n matrices, then |AB | = |BA|.
(ii) If A and B are n×n matrices, then |A + B | = |A| + |B |.
(iii) If A and B are n×n matrices such that AB2 = In , then A is nonsingular.

(i) AB  A B  B A  BA , TRUE.

1 0  3 0.
(ii) Let A    ,B   
0 2  0 4 
A  B  24, A  2, B  12, FALSE, using counter example.

(iii) AB 2  I  A B  I  1  A  0, TRUE.
2

n n

© Ahmed Hagag Linear Algebra 9


Examples

2 3 5 7
0 0 3 4
Example 3: Evaluate .
0 4 1 0
0 0 0 1

2 3 5 7 2 3 5 7
0 0 3 4 0 4 1 0
  (2)(4)(3)(1)  24.
0 4 1 0 0 0 3 4
0 0 0 1 0 0 0 1
R2  R3

© Ahmed Hagag Linear Algebra 2


Examples

Example 4: By reduction to triangular form, evaluate


1 3 4 2
1 4 3 4
.
2 5 1 8
0 1 0 1

© Ahmed Hagag Linear Algebra 3


Examples

© Ahmed Hagag Linear Algebra 4


Examples

a b c 2g a 3d
Example 5: If d e f  2, Find 2h b 3e .
g h i 2i c 3f

© Ahmed Hagag Linear Algebra 5


Examples

a b c 2g a 3d
Example 5: If d e f  2, Find 2h b 3e .
g h i 2i c 3f

2g a 3d 2g a. d g a d
2h b 3e  3 2h b. e 6h b e
2i c 3f 2i c. f i c f

d. a g a d g a b c
 6 e b h  6b e h 6d e f  6  2  12.
f c i c f i g h i

© Ahmed Hagag Linear Algebra 6


Cramer’s Rule

If the determinant 𝐴 ≠ 0, then you know the system


has a unique solution

© Ahmed Hagag Linear Algebra 2


Examples

© Ahmed Hagag Linear Algebra 3


Examples

© Ahmed Hagag Linear Algebra 4


Examples

© Ahmed Hagag Linear Algebra 5


Examples

© Ahmed Hagag Linear Algebra 6


Examples

© Ahmed Hagag Linear Algebra 7


Vectors in the plane

Geometric Representation
Geometrically, a vector in the plane is represented by a directed line
segment with its initial point at the origin and its terminal point at (𝑥1, 𝑥2).
The term vector derives from the Latin word
vectus, meaning “to carry.” The idea is that if you
were to carry something from the origin to the
point (𝑥1, 𝑥2).
𝑥1
Vectors are represented by lowercase letters set 𝐱 = 𝑥1 , 𝑥2 = 𝑥1
𝑥2 = 𝑥
2
in boldface type (such as u, v, w, and x). Non- 𝑥 = 𝑥1, 𝑥2
bold italic, as in 𝑣, or non-bold italic accented by Ԧ = 𝑥1, 𝑥2
𝑥

a right arrow, as in 𝑣Ԧ , or 𝑣റ.


© Ahmed Hagag Linear Algebra 2
Vectors in 𝑹𝒏

Vectors in 𝑹𝟐
𝑅2 = 2-space = set of all ordered pairs of real numbers.
−3 −3
a 2-vector 𝐮 = −3, 5 = = is vector in 𝑅2 or vector in the plane.
5 5

Vectors in 𝑹𝟑
𝑅3 = 3-space = set of all ordered triples of real numbers.
1 1
a 3-vector 𝐯 = 1,0, −2 = 0 = 0 is vector in 𝑅3 or vector in the space.
−2 −2

© Ahmed Hagag Linear Algebra 3


Vectors in 𝑹𝒏

Vectors in 𝑹𝒏
𝑅 𝑛 = 𝑛-space = set of all ordered 𝑛-tuples of real numbers.

𝑣1
𝑣2
An 𝑛-vector 𝐯 = ⋮ is called a vector in 𝑅 𝑛 ,
𝑣𝑛
where 𝑣1, 𝑣2, … , 𝑣𝑛 ∈ 𝑅 are called the components of the vector.

© Ahmed Hagag Linear Algebra 4


Vectors in 𝑹𝒏

Vector Equality
𝑢1 𝑣1
𝑢2 𝑣2
Two vectors 𝐮 = ⋮ and 𝐯 = ⋮ in 𝐑𝑛are said to be equal if 𝑢 𝑖 = 𝑣𝑖 , 1 ≤ 𝑖 ≤ 𝑛.
𝑢𝑛 𝑣𝑛

Example
2 2
• Two vectors 𝐮 = 0 and 𝐯 = 0 in 𝐑3 are equal.
5 5

• Two vectors 𝐬 = (−3, 2, 0, 7) and 𝐰 = (−3, 2, 0, 7) in 𝐑4 are equal.

© Ahmed Hagag Linear Algebra 5


Vectors in 𝑹𝒏

Vector Addition
𝑢1 𝑣1
𝑢2 𝑣2
The sum of two vectors 𝐮 = ⋮ and 𝐯 = ⋮ in 𝐑𝑛 are a vector in 𝐑𝑛 defined by:
𝑢𝑛 𝑣𝑛
𝑢1 + 𝑣1
𝑢2 + 𝑣2 Example
𝐮+𝐯= 1 −2

𝑢𝑛 + 𝑣𝑛 Two vectors 𝐮 = 0 and 𝐯 = 2 in 𝐑3
5 −3
1−2 −1
𝐮+𝐯= 0+2 = 2
5−3 2
© Ahmed Hagag Linear Algebra 6
Vectors in 𝑹𝒏

Scalar Multiplication
𝑢1 𝑟𝑢1
𝑢2 𝑛
𝑟𝑢2
The product of a vector 𝐮 = ⋮ in 𝐑 by a real scalar 𝑟 is defined by 𝑟𝐮 = ⋮ .
𝑢𝑛 𝑟𝑢𝑛

Example
1 −2
Let 𝐮 = 0 and 𝐯 = 2 be vectors in 𝐑3. Find 3𝐮 − 2𝐯.
5 −3
1 −2 3 4 7
3𝐮 − 2𝐯 = 3 0 − 2 2 = 0 + −4 = −4
5 −3 15 6 21
© Ahmed Hagag Linear Algebra 7
Vectors in 𝑹𝒏

Properties (1/2):

is the zero vector in 𝑹𝒏

© Ahmed Hagag Linear Algebra 8


Vectors in 𝑹𝒏

Properties (2/2):

is the zero vector in 𝑹𝒏 is the zero 𝐯𝐚𝐥𝐮𝐞 (𝐬𝐜𝐚𝐥𝐚𝐫)

© Ahmed Hagag Linear Algebra 9


Linear Combination

Linear Combination
A vector 𝐱 in 𝑅 𝑛 is a linear combination of the vectors 𝐯1, 𝐯2, ⋯ , 𝐯𝑘 in 𝑅 𝑛 if
there exist scalars 𝑐1, 𝑐2, ⋯ , 𝑐𝑘 ∈ 𝑅 such that
𝐱 = 𝑐1𝐯1 + 𝑐2𝐯2 + ⋯ + 𝑐𝑘𝐯𝑘.

The vector 𝐱 is called a linear combination of the vectors 𝐯1, 𝐯2, ⋯ , 𝐯𝑘.
Example:
The vector 𝐱 = −1, −2, −2 is a linear combination of
u = (0, 1, 4), v = ( − 1, 1, 2), and w = (3, 1, 2)
since 𝐱 = u − 2v − w.

© Ahmed Hagag Linear Algebra 2


Linear Combination

Example 1:
5
Determine whether the vector 𝐱 = is a linear combination of the
0
1 3
vectors 𝐱1 = and 𝐱2 = .
2 −4

© Ahmed Hagag Linear Algebra 3


Linear Combination

Example 1:

© Ahmed Hagag Linear Algebra 4


Linear Combination

Example 2:
10
Determine whether the vector 𝐯 = 1 is a linear combination of the
4
2 1 −2
vectors 𝐮1 = 3 , 𝐮2 = 2 and 𝐮3 = 2 .
5 4 3

© Ahmed Hagag Linear Algebra 5


Linear Combination

Example 2:

© Ahmed Hagag Linear Algebra 6


Linear Combination

Example 3:
−5
Determine whether the vector 𝐯 = 11 is a linear combination of the
−7
1 0 2
vectors 𝐮1 = −2 , 𝐮2 = 5 and 𝐮3 = 0 .
2 5 8

© Ahmed Hagag Linear Algebra 7


Linear Combination

Example 3:

© Ahmed Hagag Linear Algebra 8


Linear Combination

Example 4:
Find the value of m such that the vector (m, 7, −4) is linear combination of
vectors ( − 2, 2, 1) and (2, 1, − 2).

© Ahmed Hagag Linear Algebra 9


Linear Combination

Example 4:

© Ahmed Hagag Linear Algebra 10


Vector Spaces

Definition of a Vector Space


Let 𝑉 be a set on which two operations (vector addition and scalar multiplication)
are defined. If the listed axioms are satisfied for every u, v, and w in 𝑉 and every
scalar (real number) c and d, then 𝑉 is a vector space.

© Ahmed Hagag Linear Algebra 2


Vector Spaces

The set 𝑉 = 𝑅2 with the Standard Operations of Addition and Scalar


Multiplication is a Vector Space.

© Ahmed Hagag Linear Algebra 3


Vector Spaces

The set 𝑉 = 𝑅3 with the Standard Operations of Addition and Scalar


Multiplication is a Vector Space.

The set 𝑉 = 𝑅𝑛 with the Standard Operations of Addition and Scalar


Multiplication is a Vector Space.

The set 𝑉 = 𝑀𝑚×𝑛 of all 𝑚 × 𝑛 matrices with the matrix addition and scalar
multiplication is a Vector Space.

© Ahmed Hagag Linear Algebra 4


Vector Spaces

The set 𝑉 = 𝑃𝑛 of all polynomials of degree at most 𝑛 together with the


polynomial addition and scalar multiplication is a Vector Space.

© Ahmed Hagag Linear Algebra 5


Vector Spaces

The set 𝑉 = 𝑃2 of Second-Degree Polynomials is Not a Vector Space.

© Ahmed Hagag Linear Algebra 6


Vector Spaces

Example 1:
𝑥
Show that the set 𝑉 = 𝑦 ቚ𝑥 > 𝑦 , together with the standard operations
of vector addition and scalar multiplication is not a vector space.

© Ahmed Hagag Linear Algebra 7


Vector Spaces

Example 1:
𝑥
Show that the set 𝑉 = 𝑦 ቚ𝑥 > 𝑦 , together with the standard operations
of vector addition and scalar multiplication is not a vector space.

© Ahmed Hagag Linear Algebra 8


Vector Spaces

Example 2:
Determine whether 𝑉 = 𝑥, 𝑥 : 𝑥 is a real number together with the standard
operations, is a vector space. If it is not, identify at least one of the ten vector space
axioms that fails.

© Ahmed Hagag Linear Algebra 9


Vector Spaces

Example 2:

© Ahmed Hagag Linear Algebra 10


Vector Spaces

Example 3:
Determine whether 𝑉 = 𝑅3 together with the two operations defined as:

∀ 𝑥, 𝑦, 𝑧 ∈ 𝑉, and ∀ 𝑟 ∈ 𝑅
𝑥 𝑥′ 𝑥 + 𝑦′ 𝑥 𝑟𝑥
𝑦 ⨁ 𝑦 ′ = 𝑦 + 𝑧′ and 𝑟 ⊗ 𝑦 = 𝑟𝑦 is a vector space.
𝑧 𝑧′ 𝑧 + 𝑥′ 𝑧 𝑟𝑧
⨁ ⊗ or ⨀
vector addition scalar multiplication

Is (𝑉, ⨁,⊗) a vector space?

© Ahmed Hagag Linear Algebra 11


Vector Spaces

Example 3:

© Ahmed Hagag Linear Algebra 12


Vector Spaces

Example 4:
Consider the set of numbers 𝑉 = 𝑥: 𝑥 ∈ 𝑅, 𝑥 > 0 together with the two operations
defined as: ∀ 𝑥, 𝑦 ∈ 𝑉, and ∀ 𝑟 ∈ 𝑅 ∶ 𝑥 ⨁ 𝑦 = 𝑥 + 𝑦 and 𝑟 ⊗ 𝑥 = 𝑟𝑥
Is (𝑉, ⨁,⊗) a vector space?

© Ahmed Hagag Linear Algebra 13


Vector Spaces

Example 4:
Consider the set of numbers 𝑉 = 𝑥: 𝑥 ∈ 𝑅, 𝑥 > 0 together with the two operations
defined as: ∀ 𝑥, 𝑦 ∈ 𝑉, and ∀ 𝑟 ∈ 𝑅 ∶ 𝑥 ⨁ 𝑦 = 𝑥 + 𝑦 and 𝑟 ⊗ 𝑥 = 𝑟𝑥
Is (𝑉, ⨁,⊗) a vector space?

© Ahmed Hagag Linear Algebra 14


Vector Spaces

Example 5:
Show that the set 𝑉 = 𝑅3, together with the operations
𝑥 𝑟𝑥
𝑟 ⊗ 𝑦 = 𝑟𝑦 and the standard addition operation on 𝑅3 is not a vector space.
𝑧 0

© Ahmed Hagag Linear Algebra 15


Vector Spaces

Example 5:
Show that the set 𝑉 = 𝑅3, together with the operations
𝑥 𝑟𝑥
𝑟 ⊗ 𝑦 = 𝑟𝑦 and the standard addition operation on 𝑅3 is not a vector space.
𝑧 0

© Ahmed Hagag Linear Algebra 16


Vector Spaces

Example 6:
Let 𝑉 be the set of all positive real numbers.
Determine whether 𝑉 is a vector space with the operations shown below.

∀ 𝑥, 𝑦 ∈ 𝑉, and ∀ 𝑐 ∈ 𝑅 ∶ 𝑥 ⨁ 𝑦 = 𝑥𝑦 and 𝑐 ⊗ 𝑥 = 𝑥𝑐

© Ahmed Hagag Linear Algebra 17


Vector Spaces

Example 6: (1/2)

© Ahmed Hagag Linear Algebra 18


Vector Spaces

Example 6: (2/2)

© Ahmed Hagag Linear Algebra 19


Subspaces

Definition of a Subspace of a Vector Space


A nonempty subset 𝑊 of a vector space 𝑉 is a subspace of 𝑉 when 𝑊 is a vector
space under the operations of addition and scalar multiplication defined in 𝑉.

Test for a Subspace

© Ahmed Hagag Linear Algebra 2


Subspaces

Example 1:
𝑥
Show that the set 𝑊 = ቚ𝑥 ∈ 𝑅 is a subapace of the vector space 𝑅2 with
𝑥
the standard operations of vector addition and scalar multiplication.

© Ahmed Hagag Linear Algebra 3


Subspaces

Example 1:

© Ahmed Hagag Linear Algebra 4


Subspaces

Example 2:
Show that the set 𝑊 = 𝑥1, 0, 𝑥3 : 𝑥1and 𝑥3 ∈ 𝑅 is a subapace of the vector
space 𝑅3 with the standard operations.

© Ahmed Hagag Linear Algebra 5


Subspaces

Example 2:

© Ahmed Hagag Linear Algebra 6


Subspaces

Example 3:
Is the set 𝑊 = 𝑥1, 1, 𝑥3 : 𝑥1and 𝑥3 ∈ 𝑅 a subapace of 𝑅3 with the standard
operations ?

© Ahmed Hagag Linear Algebra 7


Subspaces

Example 3:
Is the set 𝑊 = 𝑥1, 1, 𝑥3 : 𝑥1and 𝑥3 ∈ 𝑅 a subapace of 𝑅3 with the standard
operations ?

© Ahmed Hagag Linear Algebra 8


Subspaces

Example 4:
Is the set 𝑊 = 𝑥1, 𝑥2 : 𝑥1 ≥ 0 and 𝑥3 ≥ 0 a subapace of 𝑅2 with the standard
operations ?

© Ahmed Hagag Linear Algebra 9


Subspaces

Example 4:
Is the set 𝑊 = 𝑥1, 𝑥2 : 𝑥1 ≥ 0 and 𝑥3 ≥ 0 a subapace of 𝑅2 with the standard
operations ?

© Ahmed Hagag Linear Algebra 10


Subspaces

Example 5:
𝑎
Show that 𝑊 = 𝑏 อ𝑐 = 𝑎 + 𝑏 is a subapace of the vector space 𝐑3.
𝑐

© Ahmed Hagag Linear Algebra 11


Subspaces

Example 5:

© Ahmed Hagag Linear Algebra 12


Subspaces

Example 6:
𝑎
Show that 𝑊 = 𝑏 อ𝑎, 𝑏 ∈ 𝐑 is not a subapace of the vector space 𝐑3
𝑎+𝑏+1

© Ahmed Hagag Linear Algebra 13


Subspaces

Example 6:
𝑎
Show that 𝑊 = 𝑏 อ𝑎, 𝑏 ∈ 𝐑 is not a subapace of the vector space 𝐑3
𝑎+𝑏+1

© Ahmed Hagag Linear Algebra 14


Spanning Sets

Definition of a Spanning Set of a Vector Space


Let 𝑆 = {𝐯𝟏, 𝐯𝟐, . . . , 𝐯𝐤} be a subset of a vector space 𝑉. The set 𝑆 is a spanning set
of 𝑉 when every vector in 𝑉 can be written as a linear combination of vectors in 𝑆.
In such cases it is said that 𝑆 spans 𝑉.

i.e., Span(𝑆) = 𝑐1𝐯𝟏 + 𝑐2𝐯𝟐 + ⋯ + 𝑐𝑘𝐯𝐤 ∶ 𝑐1, 𝑐2, ⋯ , 𝑐𝑘 ∈ 𝑅

Note that:
Span(𝑆) or Span{𝐯𝟏, 𝐯𝟐, . . . , 𝐯𝐤} is a subspace of 𝑉.

© Ahmed Hagag Linear Algebra 2


Spanning Sets

Example 1:
𝑎+𝑏
Show that 𝑊 = 𝑎 − 2𝑏 ተ𝑎, 𝑏 ∈ 𝑅 is a subapace of the vector space 𝑅3.
2𝑎 + 3𝑏

© Ahmed Hagag Linear Algebra 3


Spanning Sets

Example 1:
𝑎+𝑏
Show that 𝑊 = 𝑎 − 2𝑏 ተ𝑎, 𝑏 ∈ 𝑅 is a subapace of the vector space 𝑅3.
2𝑎 + 3𝑏

© Ahmed Hagag Linear Algebra 4


Spanning Sets

Example 2:
𝑥−𝑦
Let 𝑊 = 2𝑥 ተ𝑥, 𝑦 ∈ 𝑅 be a subset of the vector space 𝑅3.
3𝑥 + 4𝑦

a) Show that 𝑊 is a subspace of 𝑅3.


b) Find a subset 𝑆 of 𝑅3 that spans 𝑊.
3
c) Is 2 ∈ 𝑊? Explain.
−5

© Ahmed Hagag Linear Algebra 5


Spanning Sets

Example 2:

© Ahmed Hagag Linear Algebra 6


Spanning Sets

Example 3:
𝑎+𝑏
Let 𝑊 = 𝑏 ተ𝑎, 𝑏 ∈ 𝑅 be a subset of the vector space 𝑅3.
𝑎 − 3𝑏

a) Show that 𝑊 is a subspace of 𝑅3.


b) Find a set 𝑆 such that 𝑊 = 𝑆𝑝𝑎𝑛(𝑆).
1
c) Is the vector v = −2 in 𝑊? Explain.
9

© Ahmed Hagag Linear Algebra 7


Spanning Sets

Example 4:
Is the polynomial 𝑥3 + 𝑥 belongs to span 𝑥3 − 𝑥, 3𝑥3 + 2𝑥, 𝑥2 .

© Ahmed Hagag Linear Algebra 8


Spanning Sets

Example 4:
Is the polynomial 𝑥3 + 𝑥 belongs to span 𝑥3 − 𝑥, 3𝑥3 + 2𝑥, 𝑥2 .

© Ahmed Hagag Linear Algebra 9


Spanning Sets

Example 5:
𝑎
Find a spanning set for the subspace 𝑊 = :𝑎 ∈ 𝑅 .
2𝑎

© Ahmed Hagag Linear Algebra 10


Spanning Sets

Example 5:
𝑎
Find a spanning set for the subspace 𝑊 = :𝑎 ∈ 𝑅 .
2𝑎

© Ahmed Hagag Linear Algebra 11


Spanning Sets

Example 6:
Find a spanning set for the subspace 𝑊 = 2𝑎 : 𝑎 ∈ 𝑅 .
4𝑎

© Ahmed Hagag Linear Algebra 12


Spanning Sets

Example 6:
Find a spanning set for the subspace 𝑊 = 2𝑎 : 𝑎 ∈ 𝑅 .
4𝑎

© Ahmed Hagag Linear Algebra 13


Spanning Sets

Example 7:
𝑎
Find a spanning set for the subspace 𝑊 = : 𝑎, 𝑏 ∈ 𝑅 .
2𝑏

© Ahmed Hagag Linear Algebra 14


Spanning Sets

Example 7:
𝑎
Find a spanning set for the subspace 𝑊 = : 𝑎, 𝑏 ∈ 𝑅 .
2𝑏

© Ahmed Hagag Linear Algebra 15


Spanning Sets

Example 8:
𝑎−𝑏
Find a spanning set for the subspace 𝑊 = : 𝑎, 𝑏 ∈ 𝑅 .
𝑏 − 2𝑎

© Ahmed Hagag Linear Algebra 16


Spanning Sets

Example 8:
𝑎−𝑏
Find a spanning set for the subspace 𝑊 = : 𝑎, 𝑏 ∈ 𝑅 .
𝑏 − 2𝑎

© Ahmed Hagag Linear Algebra 17


Spanning Sets

Example 9:
𝑎
𝑊= 𝑏 : 𝑎, 𝑏 ∈ 𝑅 is subspace of 𝑅3. (True/False)
𝑎+𝑏+1

© Ahmed Hagag Linear Algebra 18


Spanning Sets

Example 9:
𝑎
𝑊= 𝑏 : 𝑎, 𝑏 ∈ 𝑅 is subspace of 𝑅3. (True/False)
𝑎+𝑏+1

© Ahmed Hagag Linear Algebra 19


Spanning Sets

Example 10:
𝑎
𝑊= 1 : 𝑎 ∈ 𝑅 is subspace of 𝑅3. (True/False)
0

© Ahmed Hagag Linear Algebra 20


Spanning Sets

Example 10:
𝑎
𝑊= 1 : 𝑎 ∈ 𝑅 is subspace of 𝑅3. (True/False)
0

© Ahmed Hagag Linear Algebra 21


Linear Independence

Definition of Linear Dependence and Linear Independence

© Ahmed Hagag Linear Algebra 2


Linear Independence

Testing for Linear Independence and Linear Dependence

© Ahmed Hagag Linear Algebra 3


Linear Independence

Example 1:
Determine whether the set of vectors in 𝑅3
is linearly independent or linearly dependent.
𝑆 = {𝐯𝟏, 𝐯𝟐, 𝐯𝟑} = {(1, 2, 3), (0, 1, 2), (−2, 0, 1)}

© Ahmed Hagag Linear Algebra 4


Linear Independence

Example 1:

© Ahmed Hagag Linear Algebra 5


Linear Independence

Example 2:
Determine whether the set of vectors in 𝑃2 is linearly independent or linearly
dependent. 𝑆 = 1 + 𝑥 − 2𝑥2, 2 + 5𝑥 − 𝑥2, 𝑥 + 𝑥2

© Ahmed Hagag Linear Algebra 6


Linear Independence

Example 2:
Determine whether the set of vectors in 𝑃2 is linearly independent or linearly
dependent. 𝑆 = 1 + 𝑥 − 2𝑥2, 2 + 5𝑥 − 𝑥2, 𝑥 + 𝑥2

© Ahmed Hagag Linear Algebra 7


Linear Independence

Example 3:
Let 𝑆 = {𝑋1, 𝑋2, 𝑋3} be linearly independent set. Show that
𝑇 = {𝑋1 + 𝑋2, 𝑋1 − 𝑋3, 𝑋2 + 2𝑋3} is linearly independent set.

© Ahmed Hagag Linear Algebra 8


Linear Independence

Example 3:

© Ahmed Hagag Linear Algebra 9


Linear Independence

Example 4:
Find the conditions that must be achieved by the scalar numbers 𝑐, 𝑘 be the set of
vectors {(1,2,0), (𝑐, 𝑘, 2), (1,0,1)} linearly dependent.

© Ahmed Hagag Linear Algebra 10


Linear Independence

Example 4:

© Ahmed Hagag Linear Algebra 11


Linear Independence

Note:
The set of 𝑛 vectors 𝑆 = 𝐯𝟏, 𝐯𝟐, ⋯ , 𝐯𝒏 in 𝐑𝑛 is linearly dependent
if the determinant 𝐯𝟏𝐯𝟐 ⋯ 𝐯𝐧 = 0,
othrerwise 𝑆 is linearly independent.

© Ahmed Hagag Linear Algebra 12


Linear Independence

Example 5: (Recall Ex. 1)


Determine whether the set of vectors in 𝑅3
is linearly independent or linearly dependent.
𝑆 = {𝐯𝟏, 𝐯𝟐, 𝐯𝟑} = {(1, 2, 3), (0, 1, 2), (−2, 0, 1)}

© Ahmed Hagag Linear Algebra 13


Linear Independence

Example 5: (Recall Ex. 1)


Determine whether the set of vectors in 𝑅3
is linearly independent or linearly dependent.
𝑆 = {𝐯𝟏, 𝐯𝟐, 𝐯𝟑} = {(1, 2, 3), (0, 1, 2), (−2, 0, 1)}

© Ahmed Hagag Linear Algebra 14


Linear Independence

Example 6:
Determine whether the set of vectors in 𝑅4 is linearly independent or linearly
dependent.

1 1 0 0
0 1 3 1
𝑆= −1 , 0 , 1 , −1
0 2 −2 2

© Ahmed Hagag Linear Algebra 15


Linear Independence

Example 7:
1 −1
The set 𝑆 = 1 , 2 is a linearly independent set of 𝑅3 . (True/False)
0 0

© Ahmed Hagag Linear Algebra 16


Linear Independence

Example 7:
1 −1
The set 𝑆 = 1 , 2 is a linearly independent set of 𝑅3 . (True/False)
0 0

© Ahmed Hagag Linear Algebra 17


Linear Independence

Span 𝑹𝒏 :
To span 𝑅 𝑛 , a set of vectors must be able to generate any vector in 𝑅 𝑛 through
linear combinations. For this to happen, the vectors must be:
• In 𝑅 𝑛 (i.e., each vector has 𝑛 components), and Linearly independent. There
must be 𝑛 such independent vectors.
For Example:
• If you have 3 linearly independent vectors, they span 𝑅3.
• If you have fewer than 3, or 3 dependent vectors, they do not span 𝑅3.

© Ahmed Hagag Linear Algebra 18


Linear Independence

Example 8:
Which of the following does not span 𝑅3?
a) 𝑥 = 2,2,2 , 𝑦 = 0,0,3 , 𝑧 = 0,1,1
b)𝑥 = 2, −1,3 , 𝑦 = 4,1,2 , 𝑧 = 8, −1,8
c)Neither 𝑎 nor 𝑏 span 𝑅3.
d)Both 𝑎 and 𝑏 span 𝑅3.

© Ahmed Hagag Linear Algebra 19


Linear Independence

Example 8:
Which of the following does not span 𝑅3?
a) 𝑥 = 2,2,2 , 𝑦 = 0,0,3 , 𝑧 = 0,1,1
b) 𝑥 = 2, −1,3 , 𝑦 = 4,1,2 , 𝑧 = 8, −1,8
c)Neither 𝑎 nor 𝑏 span 𝑅3.
d)Both 𝑎 and 𝑏 span 𝑅3.

© Ahmed Hagag Linear Algebra 20


Basis and Dimension

Definition of Basis
A set of vectors 𝑆 = {𝐯𝟏, 𝐯𝟐, . . . , 𝐯𝐤} be a subset of a vector space 𝑅 𝑛 is said to form a
basis for a subspace 𝑊 of 𝑅 𝑛 if:
1) 𝑊 = Span(𝑆) .
2) 𝑆 is linearly independent set.

Note that:
A set of 𝒏 vectors 𝑆 = {𝐯𝟏, 𝐯𝟐, . . . , 𝐯𝒏} in a vector space 𝑅𝑛
is a basis for 𝑅 𝑛 if 𝑆 is linearly independent.

© Ahmed Hagag Linear Algebra 2


Basis and Dimension

Example 1:
𝑎−𝑏
Let 𝑊 = 2𝑎 ተ𝑎, 𝑏 ∈ 𝑅 be a subset of the vector space 𝑅3.
3𝑎 + 4𝑏

Find a basis for 𝑊.

© Ahmed Hagag Linear Algebra 3


Basis and Dimension

Example 1:

© Ahmed Hagag Linear Algebra 4


Basis and Dimension

Example 2:
Show that the set 𝑆 = {(1, 1), (1, −1)} is a basis for 𝑅2.

© Ahmed Hagag Linear Algebra 5


Basis and Dimension

Example 2:
Show that the set 𝑆 = {(1, 1), (1, −1)} is a basis for 𝑅2.

© Ahmed Hagag Linear Algebra 6


Basis and Dimension

Example 3:
1 1 3
Show that 𝑋1 = 2 , 𝑋2 = 0 and 𝑋3 = 1 are bases for 𝐑3.
1 1 0

© Ahmed Hagag Linear Algebra 7


Basis and Dimension

Example 3:
1 1 3
Show that 𝑋1 = 2 , 𝑋2 = 0 and 𝑋3 = 1 are bases for 𝐑3.
1 1 0

© Ahmed Hagag Linear Algebra 8


Basis and Dimension

© Ahmed Hagag Linear Algebra 9


Basis and Dimension

Definition of the Dimension of a Vector Space


If a vector space 𝑉 has a basis consisting of 𝑛 vectors, then the number 𝑛 is the
dimension of 𝑉, denoted by dim(𝑉) = 𝑛. When 𝑉 consists of the zero vector alone,
the dimension of 𝑉 is defined as zero.

Note that:
The dimension of 𝑅 𝑛 with the standard operations is 𝑛.

© Ahmed Hagag Linear Algebra 10


Basis and Dimension

Example 4:
Find the dimension of the subspace 𝑊 of 𝑅4 spanned by
𝑆 = {𝐯𝟏, 𝐯𝟐, 𝐯𝟑} = {(−1, 2, 5, 0), (3, 0, 1, −2), (−5, 4, 9, 2)}.

© Ahmed Hagag Linear Algebra 11


Basis and Dimension

Example 4:

© Ahmed Hagag Linear Algebra 12


Basis and Dimension

Example 5:
1 3 11 7
Let 𝑆 = 2 , 2 , 10 , 6 .
2 1 7 4
Find a subset of 𝑆 that forms a basis for the subspace 𝑊 = span(𝑆).

© Ahmed Hagag Linear Algebra 13


Basis and Dimension

Example 5:

© Ahmed Hagag Linear Algebra 14


Basis and Dimension

Example 6:
𝑎
Let 𝑊 = 𝑏 : 𝑐 = 2𝑎 + 3𝑏, 𝑎, 𝑏 ∈ 𝑅 be a subset of 𝑅3.
𝑐
1) Show that 𝑊 is a subspace of 𝑅3.
2) Find a set 𝑆 such that 𝑊 = span(𝑆).
3) Find a basis for 𝑊.
4) What is dim(𝑊)?

© Ahmed Hagag Linear Algebra 15


Basis and Dimension

Example 6:

© Ahmed Hagag Linear Algebra 16


Basis and Dimension

Example 7:
1 , 3
The set 𝑆 = is a basis for 𝑅2. (True/False)
2 6

© Ahmed Hagag Linear Algebra 17


Basis and Dimension

Example 7:
1 , 3
The set 𝑆 = is a basis for 𝑅2. (True/False)
2 6

© Ahmed Hagag Linear Algebra 18


Basis and Dimension

Example 8:
Which of the following does not a basis for 𝑅3?
a) 1,1,1 , 1,1,0 , 1,0,0
b) 1,0,0 , 0,2,0 , 0,0,3
c) 1,1,2 , 1,2,1 , 0, −1,1
d)All are bases.

© Ahmed Hagag Linear Algebra 19


Basis and Dimension

Example 8:

© Ahmed Hagag Linear Algebra 20


Basis and Dimension

Example 9:
𝑎
The dimension of the subspace 𝑊 = 2𝑎 : 𝑎, 𝑏 ∈ 𝑅 is
3𝑏
a) 0
b) 1
c) 2
d) 3

© Ahmed Hagag Linear Algebra 21


Basis and Dimension

Example 9:
𝑎
The dimension of the subspace 𝑊 = 2𝑎 : 𝑎, 𝑏 ∈ 𝑅 is
3𝑏
a) 0
b) 1
c) 2
d) 3

© Ahmed Hagag Linear Algebra 22


Basis and Dimension

Example 10:
𝑎
The dimension of the subspace 𝑊 = 2𝑎 : 𝑎 ∈ 𝑅 is
3𝑎
a) 0
b) 1
c) 2
d) 3

© Ahmed Hagag Linear Algebra 23


Basis and Dimension

Example 10:
𝑎
The dimension of the subspace 𝑊 = 2𝑎 : 𝑎 ∈ 𝑅 is
3𝑎
a) 0
b) 1
c) 2
d) 3

© Ahmed Hagag Linear Algebra 24


Basis and Dimension

Example 11:
1 2 −3
The dimension of the subspace 𝑊 = 1 , 2 , −3 is
1 2 −3
a) 0
b) 1
c) 2
d) 3

© Ahmed Hagag Linear Algebra 25


Basis and Dimension

Example 11:
1 2 −3
The dimension of the subspace 𝑊 = 1 , 2 , −3 is
1 2 −3
a) 0
b) 1
c) 2
d) 3

© Ahmed Hagag Linear Algebra 26


Basis and Dimension

Rank of a matrix
The matrix 𝐴 has a rank 𝑛 if the reduced row-echelon form of A has 𝑛 nonzero rows.

1 1 3 1 0 0
𝐴= 2 0 1 ≈≈ 0 1 0 → rank 𝐴 = 3
1 1 0 0 0 1

1 2 3 1 2 3
𝐵= 1 2 3 ≈≈ 0 0 0 → rank 𝐵 = 1
1 2 3 0 0 0

© Ahmed Hagag Linear Algebra 27


Linear Transformations

[Link]

© Ahmed Hagag Linear Algebra 2


Linear Transformations

Definition of a Linear Transformation


Let 𝑉 and 𝑊 be vector spaces. The function 𝑇: 𝑉 → 𝑊 is a linear
transformation of 𝑉 into 𝑊 when the two properties below are true for all 𝐮
and 𝐯 in 𝑉 and for any scalar 𝑐 in 𝑅.
1. 𝑇 𝐮 + 𝐯 = 𝑇 𝐮 + 𝑇 𝐯
2. 𝑇 𝑐𝐮 = 𝑐𝑇(𝐮)

© Ahmed Hagag Linear Algebra 3


Linear Transformations

Properties of Linear Transformations


Let 𝑇 be a linear transformation of 𝑉 into 𝑊, where 𝐮 and 𝐯 in 𝑉. Then the
properties listed below are true.
1. 𝑇 𝟎𝑉 = 𝟎𝑊
2. 𝑇 −𝐮 = −𝑇(𝐮)
3. 𝑇 𝐮 − 𝐯 = 𝑇 𝐮 − 𝑇(𝐯)
4. 𝑇 𝑟𝐮 + 𝑠𝐯 = 𝑟𝑇 𝐮 + 𝑠𝑇(𝐯), for 𝑟 and 𝑠 ∈ 𝑅

© Ahmed Hagag Linear Algebra 4


Linear Transformations

Example 1:
𝑥 𝑥−𝑦
Show that the mapping 𝑇: 𝑅2 → 𝑅2 defined by 𝑇 = 𝑥 + 2𝑦
𝑦
is a linear transformation.

© Ahmed Hagag Linear Algebra 5


Linear Transformations

Example 1:
𝑥 𝑥−𝑦
Show that the mapping 𝑇: 𝑅2 → 𝑅2 defined by 𝑇 𝑦 = 𝑥 + 2𝑦 is a linear transformation.

© Ahmed Hagag Linear Algebra 6


Linear Transformations

Example 2:
𝑥 𝑥
Show that the mapping 𝑇: 𝑅3 → 𝑅2 defined by 𝑇 𝑦 = 𝑦+𝑧
𝑧
is a linear transformation.

© Ahmed Hagag Linear Algebra 7


Linear Transformations

Example 2:
𝑥
𝑥
Show that the mapping 𝑇: 𝑅3 → 𝑅2 defined by 𝑇 𝑦 = 𝑦 + 𝑧 is a linear transformation.
𝑧

© Ahmed Hagag Linear Algebra 8


Linear Transformations

Example 3:
𝑥 𝑥+𝑦
Show that the mapping 𝑇: 𝑅3 → 𝑅3 defined by 𝑇 𝑦 = 𝑦+𝑧
𝑧 𝑧+1
is not a linear transformation.

© Ahmed Hagag Linear Algebra 9


Linear Transformations

Example 3:
𝑥 𝑥+𝑦
Show that the mapping 𝑇: 𝑅3 → 𝑅3 defined by 𝑇 𝑦 = 𝑦 + 𝑧 is not a linear transformation.
𝑧 𝑧+1

© Ahmed Hagag Linear Algebra 10


Linear Transformations

Example 4:
Let 𝑇: 𝑅3 → 𝑅3 defined by
𝑇 𝑥1, 𝑥2, 𝑥3 = 𝑥1 − 𝑥2 + 𝑥3, 2𝑥1 + 𝑥2 − 𝑥3, −𝑥1 − 2𝑥2 + 2𝑥3
Show that T is a linear transformation.

© Ahmed Hagag Linear Algebra 11


Linear Transformations

Example 4:Let 𝑇: 𝑅3 → 𝑅3 defined by 𝑇 𝑥1, 𝑥2, 𝑥3 = 𝑥1 − 𝑥2 + 𝑥3, 2𝑥1 + 𝑥2 − 𝑥3, −𝑥1 − 2𝑥2 + 2𝑥3
Show that T is a linear transformation.

© Ahmed Hagag Linear Algebra 12


Linear Transformations

Example 5:
𝑥
Determine whether the mapping 𝑇: 𝑅2 → 𝑅 by 𝑇 = 𝑥 2 + 𝑦2
𝑦
is a linear transformation.

© Ahmed Hagag Linear Algebra 13


Linear Transformations

Example 5:
𝑥
Determine whether the mapping 𝑇: 𝑅2 → 𝑅 by 𝑇 𝑦 = 𝑥 2 + 𝑦2 is a linear transformation.

© Ahmed Hagag Linear Algebra 14


Linear Transformations

Example 6:
Let 𝑇: 𝑅2 → 𝑅2 be a linear transformation such that

1 1 0 2 . 3
𝑇 = and 𝑇 = Find 𝑇 .
0 2 1 3 −2

© Ahmed Hagag Linear Algebra 15


Linear Transformations

Example 6:
1 1 0 2 .
Let 𝑇: 𝑅2 → 𝑅2 be a linear transformation such that 𝑇 = and 𝑇 =
0 2 1 3
3
Find 𝑇 .
−2

© Ahmed Hagag Linear Algebra 16


Linear Transformations

Example 7:
1 2
Let 𝐴 = and define the mapping 𝑇: 𝑅2 → 𝑅2 by 𝑇(𝐮) = 𝐴𝐮,
3 0
for every 𝐮 ∈ 𝑅2.
1. Show that 𝑇 is a linear transformation.
1
2. Find 𝑇 .
4

© Ahmed Hagag Linear Algebra 17


Linear Transformations

Example 7:
1 2
Let 𝐴 = and define the mapping 𝑇: 𝑅2 → 𝑅2 by 𝑇(𝐮) = 𝐴𝐮, for every 𝐮 ∈ 𝑅2.
3 0
1. Show that 𝑇 is a linear transformation.

1
2. Find 𝑇 .
4

© Ahmed Hagag Linear Algebra 18


Linear Transformations

Example 7:
1 2
Let 𝐴 = and define the mapping 𝑇: 𝑅2 → 𝑅2 by 𝑇(𝐮) = 𝐴𝐮, for every 𝐮 ∈ 𝑅2.
3 0
1. Show that 𝑇 is a linear transformation.

1
2. Find 𝑇 .
4

© Ahmed Hagag Linear Algebra 19


Linear Transformations

Example 8:
3 0
Let 𝐴 = 2 1 and define the mapping 𝑇: 𝑅2 → 𝑅3 by 𝑇(𝐮) = 𝐴𝐮,
−1 −2
for every 𝐮 ∈ 𝑅2.
1. Show that 𝑇 is a linear transformation.
2. Find 𝑇 𝐮 when 𝐮 = 2, −1 .

© Ahmed Hagag Linear Algebra 20


Linear Transformations

Linear Transformation Given by a Matrix


Let 𝐴 be an 𝑚 × 𝑛 matrix. The function 𝑇 defined by
𝑇 𝐯 = 𝐴𝐯
is a linear transformation from 𝑅 𝑛 into 𝑅 𝑚 .

© Ahmed Hagag Linear Algebra 21


Linear Transformations

Example 9: True / False


𝑥 −𝑥
The transformation 𝑇: 𝑅2 → 𝑅2 defined by 𝑇 = 𝑦 − 1 is a linear
𝑦
transformation.

© Ahmed Hagag Linear Algebra 22


Linear Transformations

Example 9: True / False


𝑥 −𝑥
The transformation 𝑇: 𝑅2 → 𝑅2 defined by 𝑇 = 𝑦 − 1 is a linear
𝑦
transformation.

© Ahmed Hagag Linear Algebra 23


Linear Transformations

Example 10: True / False


𝑥 2𝑥
If 𝑆, 𝑇: 𝑅2 → 𝑅2are linear transformation defined by 𝑆 𝑦 =
3𝑦
𝑥 𝑦 1 3 .
and 𝑇 𝑦 = , then 𝑆 + 𝑇 =
−𝑥 1 2

© Ahmed Hagag Linear Algebra 24


Linear Transformations

Example 10: True / False


𝑥 2𝑥
If 𝑆, 𝑇: 𝑅2 → 𝑅2are linear transformation defined by 𝑆 𝑦 =
3𝑦
𝑥 𝑦 1 3 .
and 𝑇 𝑦 = , then 𝑆 + 𝑇 =
−𝑥 1 2

© Ahmed Hagag Linear Algebra 25


Linear Transformations

Example 11: Choose The Correct Answer


𝑎 2
2 2
If 𝑇: 𝑅 → 𝑅 is defined by 𝑇 = 2𝑎 − 𝑏 , then 𝑇 =
𝑏 𝑎 + 3𝑏 2
𝑎) 2
2
𝑏) 3
1
𝑐) 8
2
𝑑) 2
8

© Ahmed Hagag Linear Algebra 26


Linear Transformations

Example 11: Choose The Correct Answer


𝑎 2
2 2
If 𝑇: 𝑅 → 𝑅 is defined by 𝑇 = 2𝑎 − 𝑏 , then 𝑇 =
𝑏 𝑎 + 3𝑏 2
𝑎) 2
2
𝑏) 3
1
𝑐) 8
2
𝑑) 2
8

© Ahmed Hagag Linear Algebra 27


Linear Transformations

Example 12: Choose The Correct Answer


𝑎 3
3 2 2𝑎 − 3𝑐
If 𝑇: 𝑅 → 𝑅 is defined by 𝑇 𝑏 = , then 𝑇 2 =
3𝑏 + 2𝑐
𝑐 1
𝑎) 3
8
𝑏) 3
6
𝑐) 8
3
𝑑) −1
5

© Ahmed Hagag Linear Algebra 28


Linear Transformations

Example 12: Choose The Correct Answer


𝑎 3
3 2 2𝑎 − 3𝑐
If 𝑇: 𝑅 → 𝑅 is defined by 𝑇 𝑏 = , then 𝑇 2 =
3𝑏 + 2𝑐
𝑐 1
𝑎) 3
8
𝑏) 3
6
𝑐) 8
3
𝑑) −1
5

© Ahmed Hagag Linear Algebra 29


Linear Transformations

Example 13: Choose The Correct Answer


𝑥 𝑥−𝑦
If 𝑇: 𝑅2 → 𝑅2 is defined by 𝑇 𝑦 = 𝑥 + 𝑦 is a linear
transformation. The matrix 𝐴 such that 𝑇 𝑋 = 𝐴𝑋, 𝑋 ∈ 𝑅2 is
1 −1
𝑎)
1 1
1 1
𝑏)
−1 1
𝑐) 1 0
2 0
0 1
𝑑)
0 2

© Ahmed Hagag Linear Algebra 30


Linear Transformations

Example 13: Choose The Correct Answer


𝑥 𝑥−𝑦
If 𝑇: 𝑅2 → 𝑅2 is defined by 𝑇 𝑦 = 𝑥 + 𝑦 is a linear
transformation. The matrix 𝐴 such that 𝑇 𝑋 = 𝐴𝑋, 𝑋 ∈ 𝑅2 is
1 −1
𝑎)
1 1
1 1
𝑏)
−1 1
1 0
𝑐)
2 0
0 1
𝑑)
0 2

© Ahmed Hagag Linear Algebra 31


Kernel (Null Space) and Range

Definition of Kernel of a Linear Transformation


The kernel of a linear transformation 𝑇: 𝑉 → 𝑊, denoted ker(𝑇), is the set of
all vectors 𝐮 ∈ 𝑉 such that:
𝑇 𝐮 = 𝟎𝑊

© Ahmed Hagag Linear Algebra 2


Kernel (Null Space) and Range

Definition of Null Space of a Linear Transformation


If you view a matrix 𝐴 as representing a linear transformation 𝑇 𝐮 = 𝐴𝐮,
then:
Null 𝑇 = ker(𝑇)
Can write N 𝑇

© Ahmed Hagag Linear Algebra 3


Kernel (Null Space) and Range

Definition of Range (or Image) of a Linear Transformation


The range (or image) of a linear transformation 𝑇: 𝑉 → 𝑊, denoted Range(𝑇),
is the set of all vectors in 𝑊 that can be reached by applying 𝑇 to some vector
in 𝑉.
Range 𝑇 = 𝑇 𝐮 𝐮 ∈ 𝑽
Can write R 𝑇

Let T be linear transformation from Rn to Rm.


The ker(𝑇) is a subspace of Rn.

The range(𝑇) is a subspace of Rm.


dim(ker(𝑇)) + dim(range(𝑇)) = dim(domain).
nullity(𝑇) + rank(𝑇) = 𝑛.

© Ahmed Hagag Linear Algebra 4


Kernel (Null Space) and Range
𝑥 𝑥−𝑧
Example 1: 𝑇 𝑦 = 𝑦+𝑧
𝑧

© Ahmed Hagag Linear Algebra 5


Kernel (Null Space) and Range

Example 2:
Let 𝑇: 𝑅3 → 𝑅3 defined by
𝑇 𝑥1, 𝑥2, 𝑥3 = 𝑥1 − 𝑥2 + 𝑥3, 2𝑥1 + 𝑥2 − 𝑥3, −𝑥1 − 2𝑥2 + 2𝑥3
1) Show that T is a linear transformation.
2) Find the ker(𝑇).

© Ahmed Hagag Linear Algebra 6


Kernel (Null Space) and Range

Example 2:
Let 𝑇: 𝑅3 → 𝑅3 defined by 𝑇 𝑥1, 𝑥2, 𝑥3 = 𝑥1 − 𝑥2 + 𝑥3, 2𝑥1 + 𝑥2 − 𝑥3, −𝑥1 − 2𝑥2 + 2𝑥3
1) Show that T is a linear transformation.
2) Find the ker(𝑇).

© Ahmed Hagag Linear Algebra 7


Kernel (Null Space) and Range

Example 3:
Let 𝑇: 𝑅3 → 𝑅3 be linear transformation defined by

𝑥 𝑥
𝑇 𝑦 = 𝑥 + 𝑦 . Find N(𝑇) and R(𝑇).
𝑧 𝑥+𝑦+𝑧

© Ahmed Hagag Linear Algebra 8


Kernel (Null Space) and Range

Example 3:
𝑥 𝑥
Let 𝑇: 𝑅3 → 𝑅3 be linear transformation defined by 𝑇 𝑦 = 𝑥 + 𝑦 . Find N(𝑇) and R(𝑇).
𝑧 𝑥+𝑦+𝑧

© Ahmed Hagag Linear Algebra 9


Kernel (Null Space) and Range

Example 4:
𝑥
3 2
2𝑥 − 𝑦
Define 𝑇: 𝑅 → 𝑅 by 𝑇 𝑦 =
𝑦+𝑧
𝑧
1) Show that T is a linear transformation.
2) Find the null space, N(𝑇).
2) Find the ragne of T, R(𝑇).

© Ahmed Hagag Linear Algebra 10


Kernel (Null Space) and Range
𝑥
2𝑥 − 𝑦
Example 4: 𝑇 𝑦 =
𝑦+𝑧
𝑧

© Ahmed Hagag Linear Algebra 11


Kernel (Null Space) and Range

Example 5:
𝑎
𝑏 𝑎 + 𝑏
4 3
Define 𝑇: 𝑅 → 𝑅 by 𝑇 = 𝑏 − 𝑐 , where 𝑎, 𝑏, 𝑐, and 𝑑 ∈ 𝑅.
𝑐
𝑑 𝑎+𝑑
1) Find the Null(𝑇), its basis, and its dimension.
2) Find the Range(𝑇), its basis, and its dimension.

© Ahmed Hagag Linear Algebra 12


Kernel (Null Space) and Range
𝑎
𝑎+𝑏
𝑏
Example 5: 𝑇 𝑐
= 𝑏−𝑐
𝑎+𝑑
𝑑

© Ahmed Hagag Linear Algebra 13


Kernel (Null Space) and Range

Example 6:
𝑥 𝑥
Define 𝑇: 𝑅3 → 𝑅3 by 𝑇 𝑦 = 0 .
𝑧 𝑧
1) Show that T is a linear transformation.
2) Find the null space, N(𝑇).
3) Find the ragne of T, R(𝑇).

© Ahmed Hagag Linear Algebra 14


Kernel (Null Space) and Range
𝑥 𝑥
Example 6: 𝑇 𝑦 = 0
𝑧 𝑧

© Ahmed Hagag Linear Algebra 15


Kernel (Null Space) and Range

Example 7: True / False


The null space for the linear transformation 𝑇: 𝑅2 → 𝑅2 defined by
𝑥 𝑥−𝑦 0
𝑇 𝑦 = 𝑦 − 𝑥 is 𝑁 T = .
0

© Ahmed Hagag Linear Algebra 16


Kernel (Null Space) and Range

Example 7: True / False


The null space for the linear transformation 𝑇: 𝑅2 → 𝑅2 defined by
𝑥 𝑥−𝑦 0
𝑇 𝑦 = 𝑦 − 𝑥 is 𝑁 T = .
0

© Ahmed Hagag Linear Algebra 17


Kernel (Null Space) and Range

Example 8: True / False


The range for the linear transformation 𝑇: 𝑅2 → 𝑅2 defined by
𝑥 𝑥−𝑦
𝑇 𝑦 = 𝑦 − 𝑥 is 𝑅2.

© Ahmed Hagag Linear Algebra 18


Kernel (Null Space) and Range

Example 8: True / False


The range for the linear transformation 𝑇: 𝑅2 → 𝑅2 defined by
𝑥 𝑥−𝑦
𝑇 𝑦 = 𝑦 − 𝑥 is 𝑅2.

© Ahmed Hagag Linear Algebra 19


Eigenvalues and Eigenvectors

[Link]

© Ahmed Hagag Linear Algebra 2


Eigenvalues and Eigenvectors

Definitions of Eigenvalue and Eigenvector


Let 𝐴 be an 𝑛 × 𝑛 matrix. The scalar 𝜆 is an eigenvalue of 𝐴 when there is a
nonzero vector 𝐱 such that 𝐴𝐱 = 𝜆𝐱. The vector 𝐱 is an eigenvector of 𝐴
corresponding to 𝜆.

© Ahmed Hagag Linear Algebra 3


Eigenvalues and Eigenvectors

Finding Eigenvalues and Eigenvectors


𝐴 be an 𝑛 × 𝑛 matrix, and nonzero vector 𝐱 ∈ 𝑅𝑛 .
𝐴𝐱 = 𝜆𝐱
𝜆𝐱 − 𝐴𝐱 = 𝟎
𝜆𝐼𝑛 − 𝐴 𝐱 = 𝟎

1. An eigenvalue of 𝐴 is a scalar 𝜆 such that det 𝜆𝐼𝑛 − 𝐴 = 0.


2. The eigenvectors of 𝐴 corresponding to 𝜆 are the nonzero solutions of
𝜆𝐼𝑛 − 𝐴 𝐱 = 𝟎.
The sum of the eigenvalues is called the trace.
The product of the eigenvalues is the
determinant of the matrix.

© Ahmed Hagag Linear Algebra 4


Eigenvalues and Eigenvectors

Finding Eigenvalues and Eigenvectors 𝐴 be an 𝑛 × 𝑛 matrix.


1) 𝜆 : a scalar (could be zero)
det 𝜆𝐼𝑛 − 𝐴 = |𝜆𝐼𝑛 − 𝐴| = 0 (characteristic equation of 𝐴)
2) 𝐱: a nonzero vector in 𝑅𝑛
The eigenvector 𝐱 associted with the eigenvalue 𝜆 is a solusion of the
homogeneous linear syetem 𝜆𝐼𝑛 − 𝐴 𝐱 = 0.
3) 𝑉𝜆 : the eigenspace of 𝐴 corresponding to 𝜆 in 𝑅𝑛
𝑉𝜆 = span 𝐱 = 𝑟𝐱 , 𝑟 ∈ 𝑅 .

© Ahmed Hagag Linear Algebra 5


Eigenvalues and Eigenvectors

Example 1:
Find the eigenvalues and corresponding eigenvectors and eigenspace of
2 −12 .
𝐴=
1 −5

© Ahmed Hagag Linear Algebra 6


Eigenvalues and Eigenvectors
2 −12 .
Example 1: 𝐴 =
1 −5

© Ahmed Hagag Linear Algebra 7


Eigenvalues and Eigenvectors
2 −12 .
Example 1: 𝐴 =
1 −5

© Ahmed Hagag Linear Algebra 8


Eigenvalues and Eigenvectors

Example 2:
Find the eigenvalues and corresponding eigenvectors and eigenspace of
1 2 0
𝐴= 2 1 0 .
0 0 −3

© Ahmed Hagag Linear Algebra 9


Eigenvalues and Eigenvectors
1 2 0
Example 2: 𝐴= 2 1 0 .
0 0 −3

© Ahmed Hagag Linear Algebra 10


Eigenvalues and Eigenvectors
1 2 0
Example 2: 𝐴= 2 1 0 .
0 0 −3

© Ahmed Hagag Linear Algebra 11


Eigenvalues and Eigenvectors
1 2 0
Example 2: 𝐴= 2 1 0 .
0 0 −3

© Ahmed Hagag Linear Algebra 12


Eigenvalues and Eigenvectors

Note:
If the matrix 𝐴 is an 𝑛 × 𝑛 triangular diagonal matrixthen its eigenvalues
are the entries on its main diagonal.
Example: Finding the eigenvalues of

© Ahmed Hagag Linear Algebra 13


Eigenvalues and Eigenvectors

Note:
If the matrix 𝐴 is an 𝑛 × 𝑛 triangular diagonal matrixthen its eigenvalues
are the entries on its main diagonal.
Example: Finding the eigenvalues of

© Ahmed Hagag Linear Algebra 14


Eigenvalues and Eigenvectors

Example 3:
Find the eigenvalues and corresponding eigenvectors and eigenspace of
2 3 1
𝐴 = 0 −1 2.
0 0 3

© Ahmed Hagag Linear Algebra 15


Eigenvalues and Eigenvectors

Example 3:
Find the eigenvalues and corresponding eigenvectors and eigenspace of
2 3 1
𝐴 = 0 −1 2.
0 0 3

© Ahmed Hagag Linear Algebra 16


Eigenvalues and Eigenvectors

Example 4:
Find the eigenvalues and corresponding eigenvectors and eigenspace of
2 1 0
𝐴= 0 2 0 .
0 0 2

© Ahmed Hagag Linear Algebra 17


Eigenvalues and Eigenvectors

Example 4:
Find the eigenvalues and corresponding eigenvectors and eigenspace of
2 1 0
𝐴= 0 2 0 .
0 0 2

© Ahmed Hagag Linear Algebra 18


Eigenvalues and Eigenvectors

Example 5: Choose The Correct Answer

3 0
An eigenvalue for the matrix 𝐴 = is
1 −2
𝑎) 0
𝑏) 1
𝑐) − 2
𝑑) − 6

© Ahmed Hagag Linear Algebra 19


Eigenvalues and Eigenvectors

Example 5: Choose The Correct Answer

3 0
An eigenvalue for the matrix 𝐴 = is
1 −2
𝑎) 0
𝑏) 1
𝑐) − 2
𝑑) − 6

© Ahmed Hagag Linear Algebra 20


Eigenvalues and Eigenvectors

Example 6: Choose The Correct Answer

2 1
An eigenvalue for the matrix 𝐴 = is
0 2
𝑎) 0
𝑏) 1
𝑐) 2
𝑑) 3

© Ahmed Hagag Linear Algebra 21


Eigenvalues and Eigenvectors

Example 6: Choose The Correct Answer

2 1
An eigenvalue for the matrix 𝐴 = is
0 2
𝑎) 0
𝑏) 1
𝑐) 2
𝑑) 3

© Ahmed Hagag Linear Algebra 22


Eigenvalues and Eigenvectors

Example 7: Choose The Correct Answer

3 5
An eigenvector for value of 𝜆 = −2 for matrix is
3 1
𝑎) 0
1
𝑏) 1
0
𝑐) 1
1
𝑑) −1
1

© Ahmed Hagag Linear Algebra 23


Eigenvalues and Eigenvectors

Example 7: Choose The Correct Answer

3 5
An eigenvector for value of 𝜆 = −2 for matrix is
3 1
𝑎) 0
1
𝑏) 1
0
𝑐) 1
1
𝑑) −1
1

© Ahmed Hagag Linear Algebra 24


Eigenvalues and Eigenvectors

Example 8: True / False

𝑎 𝑏 𝑑 −𝑏
The matrices and have the same eigenvalues.
𝑐 𝑑 −𝑐 𝑎

© Ahmed Hagag Linear Algebra 25


Eigenvalues and Eigenvectors

Example 8: True / False

© Ahmed Hagag Linear Algebra 26


Eigenvalues and Eigenvectors

Example 9: True / False

1 0 .
𝜆 = 2 is an eigenvalue for 𝐴 =
3 2

© Ahmed Hagag Linear Algebra 27


Eigenvalues and Eigenvectors

Example 9: True / False

© Ahmed Hagag Linear Algebra 28


Diagonalization

𝐵=

© Ahmed Hagag Linear Algebra 2


Diagonalization

Definition of a Diagonalizable Matrix


An 𝑛 × 𝑛 matrix 𝐴 is diagonalizable when 𝐴 is
similar to a diagonal matrix. That is, 𝐴 is
diagonalizable when there exists an invertible matrix
𝑃 such that 𝑃−1𝐴𝑃 is a diagonal matrix.

Then 𝐵 = 𝑃−1𝐴𝑃 and 𝐴 = 𝑃−1𝐵𝑃

𝐴2 = 𝑃−1𝐵𝑃 2 = 𝑃−1𝐵𝑃 ⋅ 𝑃−1𝐵𝑃 = 𝑃−1𝐵 𝑃𝑃−1 𝐵𝑃 = 𝑃−1𝐵2𝑃


𝑘 𝐵=
Thus, 𝐴𝑘 = 𝑃−1𝐵𝑃 = 𝑃−1𝐵𝑘𝑃

© Ahmed Hagag Linear Algebra 3


Diagonalization

Similar Matrices Have the Same Eigenvalues


If 𝐴 and 𝐵 are similar 𝑛 × 𝑛 matrices, then they have the same eigenvalues.
There exists an invertible matrix 𝑃 such that 𝐵 = 𝑃−1𝐴𝑃

𝐵=

This means that 𝐴 and 𝐵 have the same characteristic polynomial.


© Ahmed Hagag Linear Algebra 4
Diagonalization

Condition for Diagonalization


An 𝑛 × 𝑛 matrix 𝐴 is diagonalizable if and only if 𝐴 has 𝑛 linearly
independent eigenvectors. Moreover, if
𝐵 = 𝑃−1𝐴𝑃
with 𝐵 a diagonal matrix, then the diagonal entries of 𝐵 are the eigenvalues of
𝐴 and the column vectors of 𝑃 are the corresponding eigenvectors.
4 0 0 1/2 1/2 0 1 3 0 1 1 0
0 −2 0 = 1/2 −1/2 0 3 1 0 1 −1 0
0 0 −2 0 0 1 0 0 −2 0 0 1
eigenvalues of 𝐴 𝐴 eigenvectors of 𝐴

If 𝐴 has 𝑛 distinct eigenvalues, then 𝐴 is diagonalizable.

© Ahmed Hagag Linear Algebra 5


Diagonalization

Steps for Diagonalizing a Square Matrix


Let 𝐴 be an 𝑛 × 𝑛 matrix.
1. Find 𝑛 linearly independent eigenvectors 𝐩1, 𝐩2, . . . , 𝐩𝑛 for 𝐴 (if possible)
with corresponding eigenvalues 𝜆1, 𝜆2, . . . , 𝜆𝑛. If 𝑛 linearly independent
eigenvectors do not exist, then 𝐴 is not diagonalizable.
2. Let 𝑃 be the 𝑛 × 𝑛 matrix whose columns consist of these eigenvectors.
That is, 𝑃 = [𝐩1 𝐩2 . . . 𝐩𝑛].
3. The diagonal matrix 𝐵 = 𝑃−1𝐴𝑃 will have the eigenvalues 𝜆1, 𝜆2, . . . , 𝜆𝑛 on
its main diagonal. Note that the order of the eigenvectors used to form 𝑃
will determine the order in which the eigenvalues appear on the main
diagonal of 𝐵.
© Ahmed Hagag Linear Algebra 6
Diagonalization

Example 1:
1 1
Let 𝐴 =
−2 4
a) Show that 𝜆 = 2 and 𝜆 = 3 are eigenvalues of 𝐴.
b) Find a matrix 𝑃 such that 𝑃−1𝐴𝑃 = 𝐷, 𝐷 is a diagonal matrix.

© Ahmed Hagag Linear Algebra 7


Diagonalization
1 1
Example 1: Let 𝐴 =
−2 4

© Ahmed Hagag Linear Algebra 8


Diagonalization
1 1
Example 1: Let 𝐴 =
−2 4

© Ahmed Hagag Linear Algebra 9


Diagonalization

Example 2:
−1 0 −1
Let 𝐴 = 0 −1 1
−1 0 −1
a) Show that 𝜆 = 0, −1, −2 are eigenvalues of 𝐴.
b) Find an eigenvector corresponding to 𝜆 = 0.
c) Show that the matrix 𝐴 is diagonalizable.

© Ahmed Hagag Linear Algebra 10


Diagonalization
−1 0 −1
Example 2: Let 𝐴 = 0 −1 1
−1 0 −1

© Ahmed Hagag Linear Algebra 11


Diagonalization

Example 3:
Show that the matrix 𝐴 is diagonalizable
1 −1 −1
𝐴= 1 3 1
−3 1 −1
Then find a matrix 𝑃 such that 𝑃−1𝐴𝑃 is diagonal.

© Ahmed Hagag Linear Algebra 12


Diagonalization

Example 3:

© Ahmed Hagag Linear Algebra 13


Diagonalization

Example 3:

© Ahmed Hagag Linear Algebra 14


Diagonalization

Example 3:

© Ahmed Hagag Linear Algebra 15


Diagonalization

Example 4:
Show that the matrix 𝐴 is diagonalizable
1 0 0
𝐴 = 6 −2 0
7 −4 2
Then find a matrix 𝑃 such that 𝑃−1𝐴𝑃 is diagonal.

© Ahmed Hagag Linear Algebra 16


Diagonalization

Example 5:
Show that the matrix 𝐴 is not diagonalizable
1 0 0
𝐴= 6 1 0
7 −4 2

© Ahmed Hagag Linear Algebra 17


Diagonalization

Example 5:

© Ahmed Hagag Linear Algebra 18


Diagonalization

Example 5:

© Ahmed Hagag Linear Algebra 19

You might also like