11/6/20151 ENM 503Linear Algebra Review 1. u = (2, -4, 3) and v = (-5, 1, 2). u + v = (2-5, -4+1, 3...

Post on 04-Jan-2016

214 views 2 download

Transcript of 11/6/20151 ENM 503Linear Algebra Review 1. u = (2, -4, 3) and v = (-5, 1, 2). u + v = (2-5, -4+1, 3...

04/20/2304/20/23 11

ENM 503 Linear Algebra Review

 1. u = (2, -4, 3) and v = (-5, 1, 2).

u + v = (2-5, -4+1, 3 +2) = (-3, -3, 5).

2u = (4, -8, 6); -v = (5, -1, -2);

u . v = ( 2*-5 + -4*1+ 3*2) = -8.

||u|| =

 

2. x(2, 3) = (y, 6) => x = 2, y = 4.

2 2 2u u 2 4 3 29

04/20/2304/20/23 22

3. Find k so that u and v and are orthogonal with

= 0 => orthogonal u = (-1, k, -2) and v = (4, -2, 5).

-4 –2k –10 = 0 => k = -7.

 4. Let u = (k, (sqrt 3), 4). Find k so that ||u|| = 10.

(k2 + 3 + 16)1/2 = 10 => k = 9.

 

5. Let u = (2, –5, 1) and v = (3, 0, 2). Find .

  = 2*3 - 5*0 + 1*2 = 8.

6. Solve 2x + 3y = 6. Infinite many solutions.

u•v

u•vu•v

04/20/2304/20/23 33

7. Solve by i) substitution, ii) elimination, iii) Cramer’s Rule, iv) Gaussian reduction, v) elementary row operations.

2x + 3y = 45x + 4y = 3

i) x = (4 – 3y)/2 substituted for x in 2nd equation yields

10 – 7.5y + 4y = 3 => y = 2; x = -1.

 ii) 2x + 3y = 4; multiply by 5 10x + 15y = 20 5x + 4y = 3; multiply by 2 10x + 8y = 6

Then subtract to get 7y = 14 => y = 2 and x = -1.

04/20/2304/20/23 44

4 3

3 42 3

5 4

x = 7 / -7 = -1

2 4

5 3

7y

= -14/-4 = 2

iii) Cramer's Rule 2x + 3y = 4 5x + 4y = 3

04/20/2304/20/23 55

4 / 7 3 / 7 2 3 4 / 7 3 / 7 4 1

5 / 7 2 / 7 5 4 5 / 7 2 / 7 3 2

x x

y y

iv) Matrix Inverse AX = bA-1AX = A-1bIX = X = A-1 b

Where X = (x, y) and b = (4, 3)

A-1 A X A-1 = b

04/20/2304/20/23 66

v) 2 3 4 1 1.5 2 1 1.5 2 1 0 -1

5 4 3 0 -3.5 -7 0 1 2 0 1 2

2x + 3y = 4 5x + 4y = 3

04/20/2304/20/23 77

System of linear equations

Inconsistent Consistent

No solution Unique solutionInfinite number of solutions

04/20/2304/20/23 88

8. Find the inverse of a 2 by 2 matrix.

1

d -b

a b -c a

c d ad-bc

04/20/2304/20/23 99

A matrix may be looked upon as a function. Consider a matrix A which maps all vectors in the plane. For example,

A =

A: (1, 3) =

Trace (A) = 3 + 2 = 5 = sum of main diagonal elements

= a11 + a22 + … + ann

1

3

15

7

3 4

1 2

3 4

1 2

04/20/2304/20/23 1010

9. Let A = 1 3

2 1

and B = 1 2

4 3

Find A2, AB, AT, (AB)T. Find A’s characteristic equation and show that A satisfies it.

Ax = tx => (tI – A)x = 0 =>

A2 - 7I = O

A2 = AB = =

AT = (AB)T = 1 2

3 1

1 3

2 1

1 2

4 3

13 7

2 7

13 2 1 4 1 2

7 7 2 3 3 1

7 0

0 7

0 0

0 0

7 0

0 7

7 0

0 7

21 3| | 7 0

2 1

ttI A t

t

04/20/2304/20/23 1111

10. Let f(t) = 2t2 –5t + 6 and g(t) = t3 –2t2 + t +3.

Find f(A) and g(A) and f(B) and g(B) for matrices

(M+ (K*mat 2 (mmult amat amat)) (k*mat -5 amat) (k*mat 6 (identity-matrix 2))) #2A((-26 -3)(5 -27)) = f(A)

#2A((3 6)(0 9)) = f(B)t2 - 3t + 17 = 0 (M+ (mmult amat amat) (K*mat -3 amat) (K*mat 17 (identity-matrix 2)))

A = B =

A2 = A3 =

f(A) = 2A2 – 5A + 6I

g(A) = A3-2A2 + A + 3I;

2 3

5 1

1 2

0 3

67 24

40 59

11 9

15 14

04/20/2304/20/23 1212

11. Find the inverse of the following matrices by forming the adjacency matrix, and then by fixing the identity matrix to it and converting the initial matrix to the identity matrix.

  B adjB |B|I

A =

A-1 = B-1 =

1 4 1 0 1 4 1 0 1 0 -3/5 4/5 2 3 0 1 0 -5 -2 1 0 1 2/5 -1/5 

1 4

2 3

1 3 3 2 6 6 16 0 0

3 5 3 6 14 6 0 16 0

6 6 4 12 12 4 0 0 16

3 4

2 1

5

2 6 6

6 14 6

12 12 4

16

04/20/2304/20/23 1313

Matrix InverseMatrix Inverse1 3 3

3 5 3

6 6 4

B =

Badj =

e.g., Cross out Row 3 and Column 1, evaluate the remaining determinant as 6, sum the indices 3 + 1 = 4, even => put 6 in transposed indices (1,3); if sum is odd put negated determinant in transposed indices.

Do the (3, 2) entry -6. The determinant is -6 but the sum of the indices is 5, odd, thus a – (-6) = 6 is put in transposed indices (2, 3) .

Do the (1, 2) entry -3. The determinant is -6 but the sum of the indices is 3, odd, thus a – (-6) = 6 is put in transposed indices (2, 1) .

Do the (2, 3) entry 3. The determinant is 12 but the sum of the indices is 5, odd, thus a – 12 is put in transposed indices (3, 2). Continued and finally divide the transposed adjacently matrix by the determinant of B.

2 6 6

6 14 6

12 12 4

04/20/2304/20/23 1414

12. Find the eigenvalues and corresponding eigenvectors of

A = (tI – A)u = 0, where u= (x, y)

= (t – 5)(t + 1) => t = 5, -1

= 0 => x = y or (1, 1); eigenvector = -2x –4y = 0 => x = -2y or (2, -1)

let P = P-1AP is diagonal matrix with the eigenvalues. PAP-1

(mmult (inverse #2A((1 2)(1 -1))) #2A((1 4)(2 3)) #2A((1 2)(1 -1))) #2A((5 0)(0 -1))

Eigenvalues appear along the main diagonal.

1 4

2 3

2t-1 -4=t -4t-5

-2 t-3

5 1 44 4

2 5 3x y

1 2

1 1

04/20/2304/20/23 1515

13. (setf am #2A((1 0)(1 2))) (eigenvalues am) (2.0 1.0) (eigenvalues (inverse am)) (1.0 0.5)

Observe inverse eigenvalues are reciprocals of original matrix's eigenvalues.

14. Show that AB and BA have same eigenvalues. (setf am #2A((1 0)(1 2)) bm #2A((4 7)(9 2)))

(eigenvalues (mmult am bm)) (20.393796 -5.393797)(eigenvalues (mmult bm am)) (20.393796 -5.393797)

04/20/2304/20/23 1616

15. Matrices

Upper triangular and Det = product of main diagonal 5 * 1* 3* 2

Symmetric since A = AT

Det (AB) = [(Det A)*(Det B)]; Note: AB BA in general.

5 3 2 9

0 1 4 6

0 0 3 7

0 0 0 2

4 1 2

1 1 7

2 7 1

04/20/2304/20/23 1717

16. Matrix PropertiesA(BC) = (AB)C AssociativeA(B + C) = AB + AC Distributive (A + B)C = AC + BC Distributive

(AB)T = BTAT TransposeAB BA in general; unless (commutative) matrices.An = AAA…AAA Power of A n A's multiplied

DeterminantsDeterminants

Compute the determinant of each matrix.

A = B =

|A| = (det #2A((1 2 3)(4 -2 3)(2 5 -1))) 79

|B| = (det #2A((2 0 1)(4 2 -3)(5 3 1))) 24

04/20/2304/20/23 1818

1 2 3

4 2 3

2 5 1

2 0 1

4 2 3

5 3 1

|AB| = |A| |B||AB| = |A| |B|

(setf am #2A((1 0)(1 2)) bm #2A((4 7)(9 2))

(det (mmult am bm)) -110

(* (det am) (det bm)) -110

(eigen (mmult A B)) = (eigen (mmult B A))

(mmult A B) #2A((12 8 0)(6 4 0)(-7 -2 1))

(mmult B A) #2A((12 6 1)(8 4 -2)(-2 -1 1))

AB BA

04/20/2304/20/23 1919

Eigenvalues: AB = BAEigenvalues: AB = BA

(eigen (mmult am bm)) ((4.0 -8.0 -8.0)

(#2A((4.0 -4 4)(-8 8.0 4)(0 0 12.0))

#2A((-8.0 -4 4)(-8 -4.0 4)(0 0 0.0))

#2A((-8.0 -4 4)(-8 -4.0 4)(0 0 0.0))))

(eigen (mmult bm am)) ((4.0 -8.0 -8.0)

(#2A((10.0 -10 10)(-2 2.0 10)(0 0 12.0))

#2A((-2.0 -10 10)(-2 -10.0 10)(0 0 0.0))

#2A((-2.0 -10 10)(-2 -10.0 10)(0 0 0.0))))

04/20/2304/20/23 2020

A *(adj A)= (adj A)*A= |A|IA *(adj A)= (adj A)*A= |A|I

(adj-mat am) #2A((2 0)(-1 1)

(adj-mat #2A((1 -3 3)(3 -5 3)(6 -6 4))) #2A((-2 -6 6)(6 -14 6)(12 -12 4))

(det #2A((1 -3 3)(3 -5 3)(6 -6 4))) 16

(mmult #2A(( 1 -3 3)(3 -5 3)( 6 -6 4)) #2A((-2 -6 6)(6 -14 6)(12 -12 4)))

#2A((16 0 0)(0 16 0)(0 0 16))

04/20/2304/20/23 2121

Characteristic EquationsCharacteristic Equations

(setf am #2A(( 1 -3 3)(3 -5 3)(6 -6 4)) bm #2A((-3 1 -1)(-7 5 -1)(-6 6 -2)))

(char-e am) 1t3 + 0t2 -12t -16 (characteristic equation)

(char-e bm) 1t3 + 0t2 -12t -16

Matrices am am and bm have the same characteristic equations but am has 3 independent eigenvectors and bm has two; and thus the two matrices are not similar.

04/20/2304/20/23 2222

Powers of Square MatrixPowers of Square Matrix

(setf A-mat #2A((1 2)(3 4)))

(expt-matrix A-mat 5) #2A((1069 1558)(2337 3406))

(apply #' mmult (list-of 5 a-mat)) #2A((1069 1558)(2337 3406))

04/20/2304/20/23 2323

AB = AC; but B AB = AC; but B C C

(setf A #2a((4 2 0)(2 1 0)(-2 -1 1))

B #2a((2 3 1)(2 -2 -2)(-1 2 1))

C #2a((3 1 -3)(0 2 6)(-1 2 1)))

(mmult a b) #2A((12 8 0)(6 4 0)(-7 -2 1)))

(mmult a c) #2A((12 8 0)(6 4 0)(-7 -2 1)))

Note that (det A) 0; A has no inverse.

04/20/2304/20/23 2424

04/20/2304/20/23 2525

Induction ExampleInduction Example

1 + 2 + … + n = n(n+1)/2; 1 = 1(1 + 1)/2

1 + 2 + … + n = n(n + 1)/2; assumed true

1 + 2 + … + n + (n + 1) = n(n+1)/2 + (n+1)

= [n(n+1) + 2(n+1)]/2

= (n+1)(n+2)/2

Laws of the Algebra of PropositionsLaws of the Algebra of Propositions

Idempotent: p + p = p pp = p

Associative: (p+q)+r = p+(q+r) (pq)r = p(qr)

Commutative: p+q = q+p pq = qp

Distributive: p+(qr) = (p+q)(p+r) p(q+r) = (pq) + (pr)

Identity: p + 0 = p p1 = p

p + 1 = 1 p0 = 0

Complement: p + ~p = 1 p ~p = 0

~ ~p = p ~1 = 0; ~0 = 1

DeMorgan: ~(p+q) = ~p~q ~(pq) = ~p + ~q

1 = true; 0 = false; ~ = not

04/20/2304/20/23 2626

Truth Table for De Morgan's LawsTruth Table for De Morgan's Laws

~(p+q) = ~p~q

p q ~p ~q p+q ~(p+q) ~p~q ~(pq) ~p+~q

0 0 1 1 0 1 1 1 10 1 1 0 1 0 0 1 11 0 0 1 1 0 0 1 11 1 0 0 1 0 0 0 0

04/20/2304/20/23 2727

Conditional StatementConditional Statement

p q converse inverse contrapositive

p q p q q p ~p ~q ~q ~p 0 0 1 1 1 10 1 1 0 0 11 0 0 1 1 01 1 1 1 1 1

04/20/2304/20/23 2828

Logical ImplicationLogical Implication

p, p q |- q Law of Detachment

p q p q0 0 10 1 11 0 01 1 1

04/20/2304/20/23 2929