Class Note for MATH 215 with Professor Dostert at UA
Class Note for MATH 215 with Professor Dostert at UA
Popular in Course
Popular in Department
This 12 page Class Notes was uploaded by an elite notetaker on Friday February 6, 2015. The Class Notes belongs to a course at University of Arizona taught by a professor in Fall. Since its upload, it has received 16 views.
Reviews for Class Note for MATH 215 with Professor Dostert at UA
Report this Material
What is Karma?
Karma is the currency of StudySoup.
Date Created: 02/06/15
THE UNIVERSITY a CF ARIZONA Math 215 Introduction to Linear Algebra Section 31 Matrix Operations Paul Dostert August 28 2008 112 A Matrix Definitions A matrix is a rectangular array of numbers called the entries also called the elements of the matrix The following are all matrices 1 1 1 0 1 1 2 1 2 73131 343W7 1 17j071 The size of a matrix is the number of rows and columns An m gtlt n matrix has m rows and n columns Ex What are the sizes of each of the matrices given above Note A vector is also a matrix A row vector is a 1 gtlt n matrix called a row matrix Similarly a column vector is a m gtlt 1 matrix called a column matrix The entries of a matrix A are denoted by am where 239 is the row number and j is the column number For example in 021 407T we have all 0 a21 4 and a23 7p Ala Matrix Definitions 2 We write a general matrix A as G11 0612 39 39 39 aln G21 G22 39 39 39 a2n A aml am2 amn We can also write A1 A2 A a1 a2 an Am where aj are the columns of A and AZ are the rows of A The diagonal entries of A are CL11CL227 How many diagonal entries are there if m gt n At Matrix Definitions 3 If A is an n gtlt n matrix then it is called a square matrix 1 1 2 A 7T xE 6 sin1 4 29 Example of square matrix A square matrix with zero nondiagonal entries is called a diagonal matrix 1 0 0 Example of diagonal matrix D 0 2 0 0 0 4 A diagonal matrix with equal diagonal entries is called a scalar matrix 40 Example of scalar matrix D 0 4 A scalar matrix with values of 1 on the diagonal is an identity matrix OOl l Ol O l lOO Example of identity matrix always called I Ala Matrix Operations Two matrices are equal if they have the same size and the same entries The sum of two matrices is defined by elementwise This makes sense only if the matrices are the same size 1 4 0 1 1 5 IfA 2 1 7B 4 2 thenAB 6 3 2 3 7 4 9 1 If c is a scalar and A is a matrix then CA is defined by multiplying each entry ofAbyc 8 1 12 2 2 and A 1 12 6 2 1 4 2 IfA 2 1 then 2A 4 2 3 1 32 Matrix subtraction is defined as A B A B Jami12 ilmenA BP 11 12 34 IfA Ala Matrix Multiplication The product of two matrices is NOT done componentwise If A is an m gtlt n matrix and B is an n gtlt 7quot matrix then the product 0 AB is an m gtlt 7quot matrix given by 39I L Cij ailblj 39 39 39 ainbnj E aikbkj k1 The ijth entry of C39 can be thought of as the ith row of A multiplied by the jth column of B Note A and B need not be the same size The number of rows of A must be the same as the number of columns of B In terms of sizes we have m X n n X 7quot m X 7 IfAiandB12 then A 1 2 2 1 1X3 2 7 A 0 17 AB 7 3 2 4X1 3X3 4X7 i 2 37 39 Ala Linear Systems as Ax b Suppose we wish to solve 931 2 933 1 931 932 2 932 933 3 1 x1 1 1 1 We can write b 2 x x2 and A 1 1 0 Then 3 x3 0 1 1 solving the linear system is equivalent to solving the system Ax b for x ln fact the augmented system Ab really means Ax b Thm Let A be an m gtlt n matrix ez a 1 gtlt m standard unit vector and ej an n gtlt 1 standard unit vector Then a eZA is the ith row of A and b Aej is the jth column of A Pf Do by direct calculation A Partitioned Matrices We can write a matrix in terms of submatrices with the matrix partitioned into blocks For example we can write 1 0 1 3 A 7 0 1 2 4 I B 7 2 0 5 7 D C39 39 0 4 6 8 We can partition a matrix into row or column vectors If B is an n gtlt 7quot matrix partitioned into column vectors then B bli 5b If A is m gtlt n then AB A 13151325 13 AbliAb25 514b If we write A as row vectors then using the same idea we can write A1 A1B A2 A2B AB B Am AmB Ala Matrix Powers and Transpose If A is an n gtlt n matrix then we can define A2 AA A3 AAA etc As usual we define A1 A and A0 I Thm If A is a square matrix and r7 5 are nonnegative integers then 1 ATA5 ATS 2 A7 5 A 2 2ltbgtA i 5 The transpose of an m gtlt n matrix A is the n X m matrix AT obtained by interchanging the rows and columns of A A square matrix A is symmetric if AT A Ex Find An for a A 3 1 2 0 1 Ex Find AT for a A b A 2 3 3 4 4 0 cA 2 311anddA4 2 3 1 A Matlab Matrix Operations Most usual operations work as expected in Matlab It will return an error if you do something incorrectly like add two matrices of different sizes The transpose operator is An identity matrix is formed using the eye command A zero matrix can be formed using zeros Try the following A 2345 B 2 103 C eye22 D zeros22 A2B B C A Block matrix operations work exactly as expected as well To define a 4 gtlt 4 block matrix A B G l C Di we simply define a 2 gtlt 2 matrix with matrices as elements G AB CD Ala Matlab Matrix Multiplication Matrix multiplication brings up an interesting issue in Matlab Let us say we wish to find Ak as k gt 00 for Al 3 Everything works as expected in Matlab A 012112 AAZ Aquot8 AA IG What does it look like this is approaching We find k 7 13 13 kIEEOA 23 23 Similarly we can multiply two different matrices B011 11 2 BA AB What will happen when we try AB We ll get an error since AB is not well de ned Z l kat1zatl katrixrIv1 lltiF3Iicnatilt11 2 Matlab also has the ability to apply operations to entry individually If we use the command before an operator then each operation is defined componentwise Note that this is ONLY defined for matrices of the same size Using componentwise arithmetic we have A 4 0k 12k A39k1 lt12gt 39 So we can try Aquot2 Aquot8 Aquot16 We find A 7 O 0 kIEEOA39 k1 039 Similarly we can multiply A componentwise to a matrix B of the same size B0111 AB BA Note A gtxlt B B gtxlt A but in general AB 3A BA for A and B of the same size