# Matrix - Matrices and vectors A matrix is a rectangular...

This preview shows pages 1–7. Sign up to view the full content.

Matrices and vectors A matrix is a rectangular array of numbers. Here’s an example: A = 2 . 3 - 1 . 4 17 - 22 . 5 0 2 . This matrix has dimensions 2 × 3. The number of rows is first, then the number of columns. We can write the n × p matrix X abstractly as X = x 11 x 12 x 13 · · · x 1 p x 21 x 22 x 23 · · · x 2 p x 31 x 32 x 33 · · · x 3 p . . . . . . . . . . . . . . . x n 1 x n 2 x n 3 · · · x np . 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Another notation that is common is A = [ a ij ] n × m for an n × m matrix A with element a ij in the i th row and j th column. The matrix X on the previous page would then be written X = [ x ij ] n × p . If two matrices A = [ a ij ] n × m and B = [ b ij ] n × m have the same dimensions, you can add them together, element by element, to get a new matrix C = [ c ij ] n × m . That is, C = A + B is the matrix with elements c ij = a ij + b ij . For example, - 1 - 2 5 7 - 10 20 + 1 2 3 4 1 2 = - 1 + 1 - 2 + 2 5 + 3 7 + 4 - 10 + 1 20 + 2 = 0 0 8 11 - 9 22 . 2
Multiplying a matrix A = [ a ij ] n × m by a number b yields the matrix C = A b with elements c ij = a ij b . For example, ( - 2) - 1 - 2 5 7 - 10 20 = - 1( - 2) - 2( - 2) 5( - 2) 7( - 2) - 10( - 2) 20( - 2) = 2 4 - 10 - 14 20 - 40 . The transpose of a matrix A prime takes the matrix A and makes the rows the columns and the columns the rows. Precisely, if A = [ a ij ] n × m then A prime is the m × n matrix with elements a prime ij = a ji . For example: If A = 1 2 3 4 5 6 , then A prime = 1 4 2 5 3 6 . Question: what is ( A prime ) prime ? 3

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
A vector is a matrix with only one column or row, called a “column vector” or “row vector” respectively. Here’s an example of each: x = 1 - 1 14 , y = [ 1 - 1 14 ] . Note that for these vectors, x prime = y and y prime = x . The product of an 1 × n row vector and a n × 1 column vector is the sum of the pairwise products of elements. So if x = [ x i ] 1 × n and y = [ y i ] n × 1 then xy = n i =1 x i y i . 4
For example, if x = [ - 1 2 ] and y = 10 - 5 then xy = [ - 1 2 ] 10 - 5 = - 1(10) + 2( - 5) = - 20 . The inner product of two n × 1 column vectors x and y is the product x prime y = [ x 1 x 2 x 3 · · · x n ] y 1 y 2 y 3 . . . y n = n summationdisplay i =1 x i y i . 5

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Note that if x = x 1 x 2 is a point in the plane R 2 , then x prime x = x 2 1 + x 2 2 is the square of the length of x . That is, || x || = x prime x . We are now ready to define general matrix multiplication. The product of an n × p matrix A and a p × m matrix B is the n × m matrix C with elements c ij = p k =1 a ik b kj . Let A be comprised of n 1 × p row vectors a 1 , . . . , a n and let B be comprised of m p × 1 column vectors b 1 , . . . , b m like A = · · · a 1 · · · · · · a 2 · · · .
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern