Download presentation
Presentation is loading. Please wait.
Published byNeal Williamson Modified over 9 years ago
1
Examples of linear transformation matrices Some special cases of linear transformations of two-dimensional space R 2 are illuminating:dimensional Dimoffree.svgDimoffree.svg
2
Matrices 2-dimensional renderings (i.e., flat drawings) of a 0-dimensional point, a 1- dimensional line segment, a 2- dimensional square, a 3-dimensional cube, and a 4-dimensional tesseractpointline segmentsquare cubetesseract
3
Creating Matrices on Matlab Symmetric Matrix << A = pascal(3); << A A = 1 1 1 1 2 3 1 3 6
4
Creating Matrices on Matlab Non-Symmetric Matrix << B = magic(3); << B B = 8 1 6 3 5 7 4 9 2
5
Matrices example Another example is a 3-by-2 rectangular matrix of random integers. << C = fix(10*rand(3,2)) << C C = 9 4 2 8 6 7
6
Matrix Division Matrix division is useful primarily for solving equations, and especially for solving simultaneous linear equations. For example, you want to solve for X in A*X = B. In ordinary algebra, you would simply divide both sides of the equation by A, and X would equal B/A. However, since matrix algebra is not commutative (A*X X*A), different processes apply. In formal matrix algebra, the solution involves matrix inversion. MATLAB, however, simplifies the process by providing two matrix division symbols, left and right (\ and /).
7
Matrix Division In general, X = A\B solves for X in A*X = B X = B/A solves for X in X*A = B. In general, matrix A must be a nonsingular square matrix; i.e., it must be invertible and it must have the same number of rows and columns.
8
Determinant Notice that the only way that two vectors can be linearly dependent is for them to be proportional (parallel) or for one of them to be 0. If the set has the same number of vectors as each vector has components, which frequently is the case, then there is a calculation to test for linear dependence.
9
Array the vectors in a square matrix and calculate its determinant. If the determinant is 0, they are dependent, and otherwise they are independent. For example, consider the vectors {(1,2,3), (4,5,6),(7,8,9)}, which are not obviously linearly dependent. A calculation shows that
10
Determinant Using Matlab one could write: A = [1 2 3; 4 5 6; 7 8 9] A = 1 2 3 4 5 6 7 8 9 s=det(A) s = 0
11
Determinant 1 2 3 4 5 6 7 8 9 +1[(5 x 9)-(8 x 6)]= -3 1 2 3 4 5 6 7 8 9 -2[(6 x 7)-(9 x 4)]= -12
12
Determinant 1 2 3 4 5 6 7 8 9 +3[(4 x 8)-(7 x 5)] = -9 1 2 3 4 5 6 7 8 9 -4[(2 x 9)-(8 x 3)] = 24
13
Determinant 1 2 3 4 5 6 7 8 9 +5[(3 x 7) - (9 x 1)] = 60 1 2 3 4 5 6 7 8 9 -6[(1 x 8)-(7 x 2) = 36 1 2 3 4 5 6 7 8 9 +7[(2 x 6)-(5 x 3)] = -21
14
Determinant 1 2 3 4 5 6 7 8 9 -8[(4 x 3) – (1 x 6)] = -48 1 2 3 4 5 6 7 8 9 +9[(1 x 5)-(4 x 2)] = -27 -3 -12 -9 +24 +60 -36 -21-48 -27 = 0
15
Simultaneous Equations by Matrix 2x + y = 13 x - 3y = -18 >> A = [2 1 ; 1 -3]; >> B = [13 ; -18]; >> X = A \ B X = 3 7
16
Solution using Determinant
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.