1 / 25

Vectors and Matrices

Vectors and Matrices. Class 17.1 E: Ch. 5. Objectives. Know what a Cartesian coordinate system is. Know the difference between a scalar and a vector. Review/learn how to interpret, add, subtract, and find the magnitude of vectors Know how to use the right hand rule. Objectives.

kenaz
Download Presentation

Vectors and Matrices

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Vectors and Matrices Class 17.1 E: Ch. 5

  2. Objectives • Know what a Cartesian coordinate system is. • Know the difference between a scalar and a vector. • Review/learn how to interpret, add, subtract, and find the magnitude of vectors • Know how to use the right hand rule.

  3. Objectives • Be able to calculate the determinant of a matrix. • Be able to calculate the dot and cross products of vectors • Be able to represent a system of linear equations as matrices and vectors. • Be able to solve systems of linear equations using matrices.

  4. z y x Cartesian Coordinates • The Cartesian coordinate system is a system of orthogonal axes which is the basis for describing body and force systems in mechanics. • The coordinate system is always right handed (obeys the right hand rule. • We will focus on 2D systems.

  5. Scalars and Vectors • A scalar is a physical quantity having magnitude but not direction • Length, mass, time • A vector is a physical quantity having both magnitude and direction • Force, velocity, acceleration

  6. z b a c y x Vectors • Vectors have components along axes of the Cartesian system • x, y, and z axes are denoted by unit vectors • carat often used to imply unit vector • Unit vectors have a magnitude (length) of one.

  7. 4 3 2 1 q 0 0 -1 -1 1 2 3 4 5 -2 Vectors • Consider the 2D vector • magnitude (length) • angle w/ horizontal

  8. Dot Product • Dot product is a vector operation. • Dot product of matrices does not exist. • The result is a scalar. • Using tools: • TI-83,86: dot • TI-89: dotp • Maple: dotprod • Matlab: dot

  9. Dot Product: • Consider the 2D case: • Plot these vectors.

  10. 4 3 2 1 q 0 0 -1 -1 1 2 3 4 5 -2 Vector Addition & Subtraction • When adding, treat each direction separately • To add, place vectors head to tail • The negative of a vector is simply pointing in the opposite direction • The sum of vectors is called the resultant.

  11. Matrix and Vector • A matrix is an n x m array of numbers • n rows, m columns • The ij-th element, aij, is the element in row i and column j • A vector is a matrix that has only one row or only one column

  12. Basic Functions • The transpose is obtained by swapping columns and rows • In Matlab: apostrophe • The addition operation requires dimensional agreement. • i.e. to add a m x n matrix and a q x r matrix, must have m = q and n = r • Matrix addition is done by corresponding element

  13. Matrix Multiplication • Matrix multiplication requires inner-dimensional agreement • i.e. to multiply a m x n matrix and a q x r matrix, must have n = q • Matrix multiplication is done by summing elementwise multiplication of row i in the first matrix with column j of the second matrix to get the ij-th element of the product.

  14. Matrix Multiplication

  15. Determinant • The determinant operation applies to a square matrix (# rows = # columns) • Denoted with bars • 2x2 case:

  16. alternate sign Determinant • For the 3x3 case:

  17. Determinant • For higher order cases uses tools. • TI-86,89: det • Maple: > with(linalg); > det([[1,5,7],[2,4,8],[3,6,9]]); • Matlab: det

  18. Cross Product • The cross product is a vector operation • yields a vector according to the right-hand-rule • Also have:

  19. Cross Product • Example: • Using your tools. • TI-89: crossp([1,5,7],[2,4,8]) • Maple: > with(linalg); > crossprod([[1,5,7],[2,4,8]); • Matlab: cross([1 5 7],[2 4 8])

  20. A-1 = Inverse • A matrix times its inverse equals the identity matrix • Identity: All elements on the main diagonal are 1, all others are 0; matrix version of the scalar 1. • Matrix division is undefined • Using TI-89: ([[1,5,7][2,4,8][3,6,9]])^-1 • Matlab: inv([1,5,7; 2,4,8; 3,6,9]); • Using Maple: inverse([[1,5,7],[2,4,8],[3,6,9]]);

  21. Linear Equations • A linear equation is of the form: where the ai’s are constants (coefficients) • In order to solve for n unknowns (xn), n independent equations are needed.

  22. 2 Equations, 2 Unknowns • Consider the system of equations: • 3 things can happen: • Exactly one solution (lines intersect)  independent • No solution (lines are parallel) • Infinite number of solutions (same line)

  23. x = Solving Systems of Equations • Consider a system of 3 eqns, 3 unknowns: • This can be written as: • Using inverses can only be used if there is a single, unique solution; If multiple or no solutions exist, the inverse does not exist

  24. Solving Systems of Equations • Using your tools: • Using Maple: multiply(inverse([[2,4,4],[1,2,1],[3,4,-2]]),[[12],[4],[1]]); • Using TI-89 (([[1,5,7],[2,4,8],[3,6,9]])^-1)*([12;4;1]) Or use ‘solve’ • Using Matlab: inv ([2,4,4; 1,2,1; 3,4,-2])*[12; 4; 1]);

  25. Homework • WebAssign • Your documentation of your homework is 20% of your webassign assignment grade. Homework documentation is due at the beginning of class when the webassign homework is due. If webassign is not due at the beginning of a class, your documentation is due at the beginning of the immediate next class or lab. • If you need a refresher on problem presentation, read Ch. 2 in Eide

More Related