Presentation is loading. Please wait.

Presentation is loading. Please wait.

Matrices And Linear Systems

Similar presentations


Presentation on theme: "Matrices And Linear Systems"— Presentation transcript:

1 Matrices And Linear Systems

2 Matrices – definitions 1
A matrix is a rectangular array of numbers. Examples: For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. Note that we surround the matrix with “brackets” (or “braces”)

3 Matrices – definitions 2
Matrices are comprised of rows and columns: This is a row; the 1st row. For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. This is an element of the matrix (or an “entry” of the matrix). This is a column; the 6th column.

4 Matrices – definitions 3
The order of a matrix is written as (m x n) where m is the number of rows and n is the number of columns. For example: This matrix has order… 4 x 6 For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. This matrix has order… 2 x 3 (Try a few more)

5 Addition and subtraction
Matrices – arithmetic 1 The rules for combining matrices are similar but different from those for numbers or vectors. Be careful about that! Addition and subtraction For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

6 We deduce our first rule about matrices:
Matrices – arithmetic 2 We deduce our first rule about matrices: Let For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. These matrices had order 2x2, but the same rule will always work as long as A and B have the same order.

7 Matrices – arithmetic 3 Notice that adding matrices is just like adding vectors. That’s because vectors are matrices with only one column. Hopefully you remember that we can multiply a vector by a “scalar” (real number) like this: For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. We can do exactly the same with any matrix of any order (this follows from the rule of addition).

8 “Rows x Columns” Matrices – arithmetic 4
Just as for vectors, we cannot divide a matrix by another matrix, but we can multiply in certain cases. To see a detailed example of how this works, please now turn to page 301 of the red book. A good simple way to remember how to multiply matrices: For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. “Rows x Columns”

9 Matrix multiplication is limited.
Matrices – arithmetic 5 Matrix multiplication is limited. We can multiply matrix A of order m x n by matrix B of order p x q if and only if Schematically: For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. For each pair of matrices on the next slide, decide if you can multiply them, and then try it!

10 Matrices – arithmetic 6 For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

11 Matrices – arithmetic 7 Any more?
For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. Any more?

12 Matrix multiplication is NOT commutative
Matrices – arithmetic 8 From our calculations, you should have noticed something important: In general we say that given any two matrices A, B, then usually: For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. Matrix multiplication is NOT commutative

13 Matrices – arithmetic 9 The fact that multiplication is not commutative means that we must be very careful when saying “AB”; it is not the same as “BA”. However, matrix multiplication is “associative”, which means: whenever these multiplications make sense. For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. Remember: “left multiply” is different from “right multiply” but the sequence in which several multiplications occur doesn’t matter

14 This concludes the section on Matrix Arithmetic.
Matrices – arithmetic 10 This concludes the section on Matrix Arithmetic. If this material was new to you, you have to practice it! For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

15 Matrices – transformation 1
Consider what happens if we left multiply a 2D vector by a 2x2 matrix: Is this multiplication possible? Why? What is the order of A? Yes; (2x2)x(2x1) gives a resulting matrix whose order is (2x1). For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. So A is another 2D vector:

16 Matrices – transformation 2
The matrix M: can be thought of as a transformation which sends any vector to a new vector What are the unit vectors i and j changed to, under the transformation M? For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. We can say that the image of i and j under the transformation M are the vectors given by the columns of M.

17 Matrices – transformation 3
It’s very important to understand it visually: For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. These are just two vectors; what about others?

18 Matrices – transformation 4
Think about how regions are transformed, e.g. the unit square: Now we can see what the transformation is doing! Can you describe it in English? For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. Answer: rotation (counterclockwise) stretch (or “enlarge”) shear (no reflection)

19 Matrices – transformation 5
Basic ideas to remember: A matrix M of order (n x n) can be thought of as a transformation of n-dimensional space Applying the transformation to an n-dimensional vector means left multiplying that vector by M To find the geometrical effect of M we can apply it to each unit vector (i, j, (k), ..) Exercise: Describe the effect of the transformation on a cube of unit volume. For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

20 Matrices – transformation 5
Answer: In words: i is transformed to 0.5i + 0.5j + 0.5k j is transformed to itself (unchanged) k is stretched by a factor of 4 For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. Visually, a cube changes to a parallelepiped through a combination of stretch, shear and rotate.

21 Matrices – transformation 6
(To think about: why isn’t matrix multiplication commutative?) Consider again our original 2-D transformation matrix M: We have seen that M maps the unit square, with (i,j) as sides, to a parallelogram. What is the area of that parallelogram? For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. After some investigation, you should see that for any matrix the area will be

22 Matrices – Scalar and vector product
Please refer to the handout for a summary of scalar (dot) and vector (cross) product Practice your understanding. What is: The vector product is distributive and associative, but not commutative: For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

23 Matrices – Scalar and vector product 2
Let’s recall the transformation of areas: The area of the blue square is For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. The area of the red parallelogram is

24 Matrices – Scalar and vector product 3
A summary so far: For a 2D transformation given by a matrix : In general, M can stretch, shear, rotate and reflect any given line or shape You can understand what M does by recognizing that it maps i to and j to M always maps parallelograms to parallelograms, and the area is changed by a factor (The sign of ad-bc indicates reflection or not) For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

25 Matrices – Determinants 1
What does it mean visually if ? It means: The 2 vectors which i and j are mapped to are in the same line The area of the parallelogram in the “image” is zero Definition: The DETERMINANT of a 2x2 matrix is and it represents a scale factor for area. Its sign indicates whether there is a reflection. For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

26 Matrices – Determinants 2
Determinants in 3 dimensions. A transformation in 3D such as maps the unit cube to a parallelepiped: as already discussed. How can we find the volume of the parallelepiped? For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. The area of the base is |b x c|

27 Matrices – Determinants 3
You should have found that the correct formula for the volume is: This is not ambiguous (we don’t need brackets). Why? By symmetry (a, b, c are not special), we can also write: or For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. The term is called the “scalar triple product” of the three vectors a, b, c. It is also the DETERMINANT of the matrix A.

28 Matrices – Determinants 4
Let’s examine how we can calculate the determinant of A. Consider the 3 rows as vectors: Then For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. What do you notice about these three terms?

29 Matrices – Determinants 5
Answer: they are all determinants of 2x2 matrices: Hopefully you can now see that the determinant of A, which is the scalar triple product a.bxc, is the sum of the products of each component of a with the determinant of the 2x2 matrix it doesn’t intersect: For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

30 Matrices – Special matrices
Before we delve further into the wonderful world of determinants, it will be useful to know a few special kinds of matrix: Square matrix - Any matrix with the same number of rows as columns Transpose - , the transpose of A, is the matrix formed by swapping the rows and columns of A For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. Example:

31 Matrices – Special matrices 2
Diagonal matrix - A square matrix all of whose entries are zero except those on the main diagonal. Using subscript notation, we would say that: Examples (all of these matrices are diagonal): For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. (usually we would not consider a non-square matrix as diagonal).

32 Matrices – Special matrices 3
Identity matrix - A diagonal matrix all of whose entries are 1. The identity matrix is always written as As you can see, for each number n there is a corresponding identity matrix: For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

33 Matrices – Special matrices 4
consists of all zeros. Null matrix - Discuss: If , what does that tell you about A? Let’s right-multiply a matrix M of order (2x3) by an identity matrix. (a) What is the order of the identity matrix? (b) What is the product MI? What is the result if we multiply I by I? Is diagonal matrix multiplication commutative? Prove that Do the operations “matrix multiplication” and “matrix transpose” commute? For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

34 Matrices – Determinants 6
Find the determinants of these 2x2 and 3x3 matrices: Answers: det(A) = 1 det(B) = -12 det(C) = 160 det(D) = 0 For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. What patterns/rules do you notice? What makes it easy/difficult?

35 Matrices – Determinants 7
Remembering the principle that a 3x3 determinant represents a scale factor for volume, answer these conceptual questions without calculating: What is det(I)? (I=identity) Explain geometrically What is det(AB), if det(A)=2 and det(B)=7? Explain visually. Don’t forget the pattern of the signs when calculating determinants: For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

36 Matrices – Determinants 8
A few more example questions: What does it mean if det(A)=0? Let A be the following matrix: Suppose det(A) = k What are the det(B) and det(C), where B and C are the following: 5. Write down the determinant of D without calculations: For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

37 Matrices – Determinants 9
Remember: the determinant of a 3x3 matrix is zero the three rows or three columns of the matrix are coplanar (this statement assumes that the zero vector is “in” all planes) You should now be able to: Calculate the determinant of a 2x2 matrix Calculate the determinant of a 3x3 matrix Recognize the geometrical meaning of the determinant and make deductions based on that knowledge. For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

38 Given a matrix A, how can we find a matrix B such that AB=I?
Matrices – Inverse 1 Given a matrix A, how can we find a matrix B such that AB=I? Why is this question important? Suppose we want to find x,y such that: For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. Or: we want to find a vector that is mapped to under the transformation

39 simple matrix multiplication
Matrices – Inverse 2 For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. This can be solved by simple matrix multiplication

40 Simple algebra will show you that
Matrices – Inverse 3 Simple algebra will show you that Calculating the inverse of a 3x3 matrix is a lot more work, usually. There are 4 steps: Calculate the determinant of M Find the transpose of M - Replace each term in with its cofactor Divide the resulting matrix (called the “adjoint”) by the result of (1), i.e.: For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

41 Please read the yellow book p. 90 for a summary of this method.
Matrices – Inverse 4 Please read the yellow book p. 90 for a summary of this method. Note: There is another method of finding the inverse, which we will discuss later. How are the determinants of a matrix M and its inverse related? Under what circumstances does a matrix M not have an inverse? For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

42 Find the determinants and inverses, where they exist,
Matrices – Inverse 5 Find the determinants and inverses, where they exist, of the following square matrices: For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

43 Matrices – Linear systems 1
Solve the following “system” of equations: Ans: (1,1,3) Could you solve the following system using the same method? Would you make mistakes? Are there alternative methods we could use? For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

44 Matrices – Linear systems 2
We call sets of equations like this: For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. “systems of linear equations” because each unknown variable occurs only to power 1, individually. So, there are no terms like:

45 Matrices – Linear systems 3
Notice that we can solve linear systems using the inverse of a matrix: To solve: write so that For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

46 Matrices – Linear systems 4
Now we can use our knowledge of matrix inverses to find the solution: Given: find: and thus verify that the solution to the system is x=1, y=1, z=3. For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. Answer:

47 Matrices – Gaussian elimination
As we can see, matrix inversion is a difficult and error prone method, but it is important to know about it. Gaussian elimination is a systematic way to solve this type of system. We reduce the augmented matrix to row-echelon form. Review p of the yellow book for the method. See also p.8-10 of my document “A Visual Introduction to Linear Algebra. For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

48 Matrices – Linear systems 5
To keep things simple, let’s stick to systems with 3 equations and 3 unknowns. How many solutions can there be? One Zero Infinitely many ( a line) Infinitely many ( a plane) Consider carefully the images on the next slides, which are copied from my document “A Visual Guide to Linear Algebra”. For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

49 Matrices – Linear systems 6
For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

50 Matrices – Linear systems 7
For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

51 Matrices – Linear systems 8
For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

52 Matrices – Linear systems 9
For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

53 Matrices – Linear systems 10
For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

54 Matrices – Linear systems 11
In examining these patterns, you should remember that the equation represents a plane whose normal is the vector p yellow book gives further illustrations. The most important principle, which I now repeat, is that: For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

55 Matrices – Linear systems 12
Use Gaussian elimination to find the general solution of the following linear systems. Describe the solutions geometrically: Ans: infinite solutions. See next slide. 1: For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. 2: Ans:

56 Matrices – Linear systems 13
To solve a problem like (1), I expect you to use the following method: Reduce the augmented matrix to row echelon form: For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. What does the bottom row of zeros tell you?

57 Matrices – Linear systems 14
Ans: Only two of the equations are independent. Also, the matrix is singular and its determinant is zero. There isn’t a unique solution, but there clearly are solutions (the null vector is obviously a solution). We reason as follows: z can take any value, let’s call it μ. Examining the second row tells us that Examining the first row tells us: For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

58 Matrices – Linear systems 15
Thus the general solution can be written most simply as: For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is. This is just the line of intersection of the three planes:

59 Matrices – Linear systems 16
The method described in the last two slides can be applied to any linear system and I highly recommend it. Here’s a summary: Write the system in augmented matrix form. Use elementary row operations to change the system to row-echelon form. If there are no zero rows, find the single solution If the left hand side has one or more zero rows, deduce whether there are NO solutions or an INFINITE number If there are an infinite number, parametrize the undefined variables (e.g. z=alpha), and write the other variables in terms of the parameter Deduce the geometric form of the solution (point, line or plane) For the 4th order example given, ask students to give values of the ak coefficients The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

60 For the 4th order example given, ask students to give values of the ak coefficients
The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

61 For the 4th order example given, ask students to give values of the ak coefficients
The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

62 For the 4th order example given, ask students to give values of the ak coefficients
The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

63 For the 4th order example given, ask students to give values of the ak coefficients
The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

64 For the 4th order example given, ask students to give values of the ak coefficients
The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.

65 For the 4th order example given, ask students to give values of the ak coefficients
The graph is a good subject for discussion of the nature of higher order polynomials Don’t forget to ask the students what a 1st order polynomial is.


Download ppt "Matrices And Linear Systems"

Similar presentations


Ads by Google