1 / 19

Module #9: Matrices

This module provides an introduction to matrices and explores their various applications in fields such as linear equations, computer graphics, computational science, and quantum mechanics. It covers matrix equality, row and column order, matrix sums and products, identity matrices, matrix inverses, matrix transposition, symmetric matrices, and zero-one matrices.

tsimpson
Download Presentation

Module #9: 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. Module #9:Matrices Rosen 5th ed., §2.7 ~18 slides, ~1 lecture (c)2001-2003, Michael P. Frank

  2. §2.7 Matrices • A matrix (say MAY-trix) is a rectan-gular array of objects (usually numbers). • An mn (“m by n”) matrix has exactly m horizontal rows, and n vertical columns. • Plural of matrix = matrices(say MAY-trih-sees) • An nn matrix is called a square matrix,whose order is n. Notourmeaning! a 32 matrix Note: The singular formof “matrices” is “matrix,”not “MAY-trih-see”! (c)2001-2003, Michael P. Frank

  3. Applications of Matrices Tons of applications, including: • Solving systems of linear equations • Computer Graphics, Image Processing • Models within Computational Science & Engineering • Quantum Mechanics, Quantum Computing • Many, many more… (c)2001-2003, Michael P. Frank

  4. Matrix Equality • Two matrices A and B are equal iff they have the same number of rows, the same number of columns, and all corresponding elements are equal. (c)2001-2003, Michael P. Frank

  5. Row and Column Order • The rows in a matrix are usually indexed 1 to m from top to bottom. The columns are usually indexed 1 to n from left to right. Elements are indexed by row, then column. (c)2001-2003, Michael P. Frank

  6. Matrices as Functions • An mn matrix A = [ai,j] of members of a set S can be encoded as a partial function fA: ℕℕ→S, such that for i<m, j<n,fA(i, j) = ai,j. • By extending the domain over which fA is defined, various types of infinite and/or multidimensional matrices can be obtained. (c)2001-2003, Michael P. Frank

  7. Matrix Sums • The sumA+B of two matrices A, B (which must have the same number of rows, and the same number of columns) is the matrix (also with the same shape) given by adding corresponding elements. • A+B = [ai,j+bi,j] (c)2001-2003, Michael P. Frank

  8. Matrix Products • For an mk matrix A and a kn matrix B, the productAB is the mn matrix: • I.e., element (i,j) of AB is given by the vector dot product of the ith row of A and the jth column of B (considered as vectors). • Note: Matrix multiplication is not commutative! (c)2001-2003, Michael P. Frank

  9. Matrix Product Example • An example matrix multiplication to practice in class: (c)2001-2003, Michael P. Frank

  10. Identity Matrices • The identity matrix of order n, In, is the order-nmatrix with 1’s along the upper-left to lower-right diagonal and 0’s everywhere else. (c)2001-2003, Michael P. Frank

  11. Review: §2.6 Matrices, so far Matrix sums and products: A+B = [ai,j+bi,j] Identity matrix of order n:In = [ij], where ij=1 if i=j and ij=0 if ij. (c)2001-2003, Michael P. Frank

  12. Matrix Inverses • For some (but not all) square matrices A, there exists a unique multiplicative inverseA-1 of A, a matrix such that A-1A = In. • If the inverse exists, it is unique, and A-1A = AA-1. • We won’t go into the algorithms for matrix inversion... (c)2001-2003, Michael P. Frank

  13. (m)· (n)·( (1)+ (k) · (1)) Matrix Multiplication Algorithm procedurematmul(matrices A: mk, B: kn) fori := 1 tom forj := 1 tonbegin cij := 0 forq := 1 tok cij := cij + aiqbqj end {C=[cij] is the product of A and B} What’s the  of itstime complexity? Answer:(mnk) (c)2001-2003, Michael P. Frank

  14. p times Powers of Matrices If A is an nn square matrix and p0, then: • Ap  AAA···A (A0  In) • Example: (c)2001-2003, Michael P. Frank

  15. Matrix Transposition • If A=[aij] is an mn matrix, the transpose of A (often written At or AT) is the nm matrix given by At = B = [bij] = [aji] (1in,1jm) Flipacrossdiagonal (c)2001-2003, Michael P. Frank

  16. Symmetric Matrices • A square matrix A is symmetric iff A=At. I.e., i,jn: aij = aji . • Which is symmetric? (c)2001-2003, Michael P. Frank

  17. Zero-One Matrices • Useful for representing other structures. • E.g., relations, directed graphs (later in course) • All elements of a zero-one matrix are 0 or 1 • Representing False & True respectively. • The meet of A, B (both mn zero-one matrices): • AB : [aijbij] = [aij bij] • The join of A, B: • AB : [aijbij] (c)2001-2003, Michael P. Frank

  18. Boolean Products • Let A=[aij] be an mk zero-one matrix,& let B=[bij] be a kn zero-one matrix, • The boolean product of A and B is like normal matrix , but using  instead + in the row-column “vector dot product.” A⊙B (c)2001-2003, Michael P. Frank

  19. Boolean Powers • For a square zero-one matrix A, and any k0,the kth Boolean power of A is simply the Boolean product of k copies of A. • A[k]  A⊙A⊙…⊙A k times (c)2001-2003, Michael P. Frank

More Related