Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lec7 Revision

Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

Faculty of

Engineering

Math 1 –
Course Revision

Prof. Ahmed Elsaid


ahmed.elsaid@ejust.edu.eg
SLE

Unique
Infinite number No solution
solution
of solutions

x+y=2 x+y=2 x+y=2


x–y=0 3x + 3y = 6 x + y =3

Consistent system Inconsistent system

Two linear systems are called equivalent if they have the same solution set.

Two matrices are called row equivalent if there is a sequence of elementary


row operations that transforms one matrix into the other.

If the augmented matrices of two linear systems are row equivalent, then the two
systems have the same solution set.
If the number of independent equations = number of variables, Unique solution

If the number of independent equations < number of variables, Infinnite


number of solutions

If the number of independent equations > number of variables, No solution

MTH111 LA (Fall 2022)


Echelon form
• A matrix is in row echelon form (REF) if
– Zero rows (if any) are at the bottom
– Leading entries move to the right across rows
(A leading entry is the first non-zero entry in a row. It is the pivot!)

• Any matrix can be reduced to a REF through row operations.


• The reduction to REF is NOT unique. However, pivot positions are the
same.
Reduced echelon form
• A matrix is in reduced row echelon form (RREF) if
– It is in echelon form
– Any leading entry = 1
– Leading entries are the only non-zero entries in their columns
• Any matrix can be reduced to a RREF through row operations.
• The reduction to RREF is unique. (Any matrix is row equivalent to one
and only one reduced echelon form)
Step1: Reduce aug A to the row echelon form (REF)
Step 2: IF the last column in aug A is a pivot column
THEN the system has no solution (inconsistent system)
ELSE IF each column in A is a pivot column
THEN the system has a unique solution
ELSE the system has an infinite number of solutions
Step 3: For consistent systems, reduce aug A to reduced row echelon
form (RREF) to find the solution/solution form.

5 Math 1 - LA (Fall 2022)


Linear combinations
• A Linear combination (LC) of the vectors v1, v2, . . , vn takes
the form
x1 v1 + x2 v2 + . . . + xn vn,
where x1, x2, . . ., xn are scalars (real numbers).
• The linear combination produces a vector in the same space.
Matrix form Vector form

 a11   a12   a13   b1 


 a11 a12 a13   x1   b1 
a x1 a 21  + x 2 a 22  + x 3 a 23  = b 2 
 21 a22 a23   x 2  = b2 
a 31  a 32  a 33   b3 
a31 a32 a33   x 3  b3 
A x = b x1 v1 + x 2 v2 + x 3 v3 = b
• We seek the values of x1, x2 and x3 that makes the vector b a linear
6
combination of the vectors v1, v2 and v3.
Linear independence definition
The v1, v2, . . ., vn are linearly independent (LI) if
the vector equation
x1 v1 + x2 v2 + . . . + xn vn = 0,
has only the trivial solution.
Otherwise, v1, v2, . . ., vn are linearly dependent (LD).

Interpretation (n  2)
• The v1, v2, . . ., vn are linearly independent if non of them
can be written as a linear combination of the others.
• The v1, v2, . . ., vn are linearly dependent if at least one of
them can be written as a linear combination of the others.

7 Math 1 - LA (Fall 2022)


What’s transformation (cont’d)
Transformation  Mapping  function

T
Rn Rm
Domain x Codomain
T(x)
Range

• A transformation T from Rn to Rm is a rule that assigns to


each vector x in Rn a unique vector T(x) in Rm.
• Matrix transformation: T(x) = A x

o A matrix Amn transforms vectors in Rn to vectors in Rm.


Math 1 - LA (Fall 2022)
Linear transformation
A transformation T is linear if
1) T(u + v) = T(u) + T(v),
2) T(a u) = a T(u),
for all vectors u, v (in the domain of T) and scalar a.
If a transformation T is linear, then
o T(0) = 0,
Superposition principle
o T(a u + b v) = a T(u) + b T(v)
o T(a1 v1 + . . . + ar vr) = a1 T(v1) + . . . + ar T(vr)

Math 1 - LA (Fall 2022)


MTH111 LA (Fall 2022)
11 Math 1 - LA (Fall 2021)
6. Matrix transpose (cont’d)
Properties of AT
• (AT)T = A
• (A + B)T = AT + BT
• (k A)T = k AT
• (A B)T = BT AT

Example
Prove that (A B C)T = CT BT AT

Solution
((A B) C)T = CT (A B)T = CT (BT AT) = CT BT AT

12 Math 1 - LA (Fall 2020)


Properties of matrix Inverse
If A and B are invertible matrices of the same size, then
1.A–1 is invertible, and (A–1)–1 = A
2.AB is invertible, and (AB)–1 = B–1 A–1
3.AT is invertible, and (AT)–1 = (A–1)T

Proof of No. 2

➢ If A and B are invertible matrices, then A B is invertible

det (A B) = det (A) det (B)  0


➢ The inverse of A B is given by B–1 A–1

B–1 A–1 (A B) = B–1 (A–1 A) B = B–1 I B = (B–1 I) B = B–1 B = I


14 Math 1 - LA (Fall 2021)
MTH111 LA (Fall 2022)
Find the general flow pattern of the network shown in the figure below. If you
assume that all the flows are nonnegative, what is the largest possible value for x3?

Since x1 and x2 cannot be negative, the largest possible value of x3 is 40


Example
Does b belong to the plane represented by 1  5  − 3
a = − 2, a = − 13, b =  8 
Span{a1, a2} ? 1   2    
 3   − 3   1 
Answer
• We search for x1 and x2 such that x1 a1 + x2 a2 = b.
• The SLE has no solution. Then, b  Span{a1, a2}. So, b is not in the plane
generated by a1 and a2.

Example 1 3 4


Find the set of vectors that can be written as a1 =  −4  , a 2 =  2  , a3 =  −6 
LC of a1, a2 and a3, i.e., find Span {a1, a2, a3}.  −3  −2   −7 
Answer
• Consider b  R3 and reduce [a1, a2 a3 b] to REF. 1 3 4 b1 
augA  0 14 10 b + 4b 
• Only vectors having b1 – 0.5 b2 + b3 = 0,  2 1 
0 0 0 b1 − 2 b2 + b3 
1
can be written as a LC of a1, a2 and a3

17
Math 1 - LA (Fall 2022)
Testing linear independence (example)
To test the linear independence of the vectors v1, v2, . . ., vn:
1) Construct the matrix A = [v1, v2, . . ., vn].
2) Reduce A to echelon form.
3) If there is a pivot in each column,
then v1, v2, . . ., vn are LI,
else v1, v2, . . ., vn are LD.

1 4 2
1 4  2 A = 2 5 1
v1 = 2, v 2 = 5 , v3 = 1

3 6 0 
3 6 0
1 0 −2
0 1 1 

18 Math 1 - LA (Fall 2022)
0 0 0 
Geometrical linear transformations in R2
Example (Contraction/dilation transformation)
Consider a linear transformation T: R2 → R2
defined by T(x) = r x, r is a scalar.
• Contraction when 0 ≤ r ≤ 1
• Dilation when r > 1
Find the standard matrix.

Example (Reflection about the x2-axis)


Consider a linear transformation T: R2 → R2
that reflects each point in R2
about the x2-axis (the y-axis).
Find the standard matrix.

Math 1 - LA (Fall 2022)


Geometrical linear transformations in R2 (cont’d)
Example (Vertical expansion)
Consider a linear transformation T: R2 → R2
that expands each region in R2
in the vertical direction by a factor of k (>1).
Find the standard matrix.

Example (rotation transformation)


Consider a linear transformation T: R2 → R2
that rotates each point in R2
about the origin through an angle .
Find the standard matrix.

Math 1 - LA (Fall 2022)


Properties of matrix multiplication
Example  3 −2 
1 2 −1
Find A B, B A A=  , B = 1 2 
0 −2 3   4 5 

• [not commutative] A B ≠ B A, in general


• [Associative] A (B C) = (A B) C
• [Distributive over addition]
A (B + C) = A B + A C, A (B + C) = A B + A C,
• [Identity matrix] IA=AI=A

Example
1 2 −1  2 −3 0 1
Find B A + C A A=  , B=  , C= 
0 −2 3  5 4   2 1

21 Math 111 - LA (Fall 2022)


5. Matrix power
For a square matrix A,
Ak = A A . . . A, k times
where k is a positive integer.

Example [Adjacency matrix] 1 2

• Write down the adjacency matrix of the shown network.


5 3

• Compute B = A2 and interpret it.


4

Solution
0 1 0 0 0 1 0 0 0 1
• b15 = 1 means that there is 1 directed 1 0 0 0 1  0 2 0 1 0 
 
path of length 2 from node 1 to node 5. A = 0 1 0 0 1  , B = 1 1 0 1 1
   
• b42 = 2 means that there are 2 directed 0 0 1 0 1 0 2 0 1 1
0 1 0 1 0  1 0 1 0 2 
paths of length 2 from node 4 to node 2.
➢ To determine the shortest path length between i and j, find Ak until the position (i, j) is non-zero.
22 Math 111 - LA (Fall 2022)
Determinants properties
• If A is triangular, then det A equals the product of the diagonal
elements.
 2 −1 9 
A =  0 3 5  det( A) = 2  3  −2 = −12
 0 0 −2 
• det (AB) = det A . det B
• A matrix A has an inverse if only if det A ≠ 0.
A–1 exists  det A ≠ 0
• Computing cofactors is very time-consuming.
– Calculating the determinant of 5050 matrix on a computer that performs
1030 operations per second requires approximately 1027 years.
– Faster methods for finding det A will be given in the sequel.

23 Math 1 - LA (Fall 2021)


24
Matrix inverse using elimination method
Example
Find the inverse of

Forward

elimination

backward

elimination

A–1
• To find the inverse of An×n, we solve n systems with
aug A = [A I].
• If each column is a pivot column, the solution is A–1.
25 Math 1 - LA (Fall 2021)
Encryption (cont’d)
http://aix1.uottawa.ca/~jkhoury/cryptography.htm

1. Encode the text message and put it in a suitable matrix form.


2. Encrypt the coded message by multiplying it by the key
matrix.
3. Send the encrypted message.
4. Decrypt the received message by multiplying it by the inverse
of the key matrix.
5. Decode the message to retrieve the original text message.
Example
Using the shown key matrix A, find the encrypted  −3 −3 4 
A =  0 1 1
message of  
PREPARE TO NEGOTIATE  4 3 4 

26 Math 1 - LA (Fall 2020)


The encryption cycle
(transmitter side)
Encoding

Matrix
form

Encryption
=

The key matrix

Transmission
The encrypted message

27 Math 1 - LA (Fall 2020)


The encryption cycle
(receiver side)
Decryption
=

The inverse of the key matrix

Decoding The
original
message

28 Math 1 - LA (Fall 2020)

You might also like