The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data entries are organized in rows and columns, just like in a spreadsheet or a table with data. More information can be found on Wikipedia. ( ) This brief introduction is by far not complete, It is NOT a formal mathematical introduction to Linear Algebra !
A matrix with two rows and four columns A matrix with two rows and three columns A matrix with two rows and two columns 12 56
A matrix with two rows and four columns A matrix with two rows and two columns
The size of this matrix is 2 rows by 3 columns (we say ‘2 by 3’ and write ‘2 x 3’) x 1,1 x 1,2 x 1,3 x 1,2 x 2,2 x 2,3 row 1 row 2 column 1column 2column 3
The size of this matrix is 2 rows by 3 columns (we say ‘2 by 3’ and write ‘2 x 3’) x 1,1 x 1,2 x 1,3 x 1,2 x 2,2 x 2,3 We use two indices to identify an entry in the matrix: a row and column index row 1 column 3 Entry in row 1, column 3: x 1,3 [X] 1,3 (X) 1,3 Matrix symbols: Capital letters ‘X’ or underlined Capital letters ‘X’ X entry (X) 2,3 = 7
The size of this matrix is 2 rows by 3 columns (we say ‘2 by 3’ and write ‘2 x 3’) x 1,1 x 1,2 x 1,3 x 1,2 x 2,2 x 2,3 We use two indices to identify an entry in the matrix: a row and column index ‘(‘ and ‘)’ are used to embrace the entries, when writing matrix arrays or ‘[‘ and ‘]’ or ‘|’ ‘|’ Matrix symbols: Capital letters ‘X’ or underlined Capital letters ‘X’ ()
A square matrix of size n by n with n=3 A rectangular matrix of size m by n with m=3 and n=6 (m<n) A rectangular matrix of size m by n with m=4 and n=3 (m>n)
Multiplication with a scalar: = c X = Z Size: m x n m x n (Z) i,j = c(x) i,j (For all i and j)
X + Y = Z Size: m x n m x n m x n (Z) i,j = (X) i,j +(Y) i,j (For all i and j) Addition of Matrices: =
X T = Y Size: m x n n x m (X) i,j = (Y) j,i (For all i and j) Transpose of a Matrix = T
Matrix Multiplication: A B = C Size: m x n n x k m x k NOTE: Matrix multiplication is only defined for two matrices when the left matrix A has the same number of columns as the right matrix B has rows! The resulting matrix has the same number of rows as the left matrix A and the same number of columns as the right matrix B.
Matrix Multiplication: A B = C Size: 4 x 2 2 x 3 4 x 3 = ?
Matrix Multiplication: A B = C Size: 4 x 2 2 x 3 4 x 3 = 1*1+0*5 Column 1 Row 1 Vector dot product
Matrix Multiplication: A B = C Size: 4 x 2 2 x 3 4 x 3 = 1*1+0*5 3*0+7*1 Column 2 Row 3
Matrix Multiplication: A B = C Size: 4 x 2 2 x 3 4 x 3 = 1*1+0*51*1+5*1 3*0+7*1 Column 3 Row 1
Matrix Multiplication: A B = C Size: 4 x 2 2 x 3 4 x 3 =
Matrix Multiplication: A B = C Size: m x n n x k m x k Note: A B is not equal B A ! Rule to remember: We pick from the left matrix a row vector (row i) and from the right matrix a column vector (column j), calculate the dot product between the two vectors and enter the result in the new matrix in row i, column j.
Errors can easily sneak into the slides. If you find a mistake, please contact me Thanks! See also a 5 minute introduction: