Matrices and Vectors
Matrices are 2-dimensional arrays:A vector is a matrix with one column and many rows:
Notation and terms:
- refers to the element in the ith row and jth column of matrix A.
- A vector with 'n' rows is referred to as an 'n'-dimensional vector.
- refers to the element in the ith row of the vector.
- In general, all our vectors and matrices will be 1-indexed. Note that for some programming languages, the arrays are 0-indexed.
- Matrices are usually denoted by uppercase names while vectors are lowercase.
- "Scalar" means that an object is a single value, not a vector or matrix.
- refers to the set of scalar real numbers.
- refers to the set of n-dimensional vectors of real numbers.
Addition and Scalar Multiplication
Addition and subtraction are element-wise, so you simply add or subtract each corresponding element:In scalar multiplication, we simply multiply every element by the scalar value:
Matrix-Vector Multiplication
We map the column of the vector onto each row of the matrix, multiplying each element and summing the result.An m x n matrix multiplied by an n x 1 vector results in an m x 1 vector.
Matrix-Matrix Multiplication
We multiply two matrices by breaking it into several vector multiplications and concatenating the result.To multiply two matrices, the number of columns of the first matrix must equal the number of rows of the second matrix.
Matrix Multiplication Properties
- Matrices are not commutative:
- Matrices are associative:
Inverse and Transpose
The inverse of a matrix A is denoted . Multiplying by the inverse results in the identity matrix.A non square matrix does not have an inverse matrix. We can compute inverses of matrices in octave with the function and in Matlab with the function. Matrices that don't have an inverse are singular or degenerate.
The transposition of a matrix is like rotating the matrix 90° in clockwise direction and then reversing it. We can compute transposition of matrices in matlab with the transpose(A) function or A':
place holder
No comments:
Post a Comment