Fundamentals of Matrices: Scalar, Vectors and Matrices
Fundamentals of Matrices: Scalar, Vectors and Matrices
Vector
A vector is a list of numbers (can be in a row or column)
Matrix
A matrix is an array of numbers (one or more rows, one or more columns).
Three basic things of every matrix are
1) elements (e.g. 6 elements)
2) order (e.g. 2x3 Matrix. i.e. 2 rows and 3 columns)
3) position of an element [(row, column) th element. e.g. (1,2)th element = a12; (2,3)th element = a23;
etc.)
In fact a vector is also a matrix! Because a matrix can have just one row or
one column. So the rules that work for matrices also work for vectors.
3+4=7 8+0=8
4+1=5 6−9=−3
The two matrices must be the same size, i.e. the rows must match in size, and
the columns must match in size.
But it could not be added to a matrix with 3 rows and 4 columns (the columns
don't match in size)
Negative
The negative of a matrix is also simple:
−(2)=−2 −(−4)=+4
−(7)=−7 −(10)=−10
3−4=−1 8−0=8
4−1=3 6−(−9)=15
Multiplication
Scalar Multiplication (Multiply by a Constant)
′
2×4=8 2×0=0
2×1=2 2×−9=−18
A×B If
Columns A = Rows B A×B = B×A (NOT always!)
compatible
Sometimes,
B×A If it can be A×B ≠ B×A
Columns B = Rows A
compatible
1 1 2 1 1 2 2 1 1 0 2 3
1 1 0 1 1 2 0 1 1 0 0 3
3 0 6
∴
1 2 0
But, in this example is NOT compatible of multiplication because Columns B ≠ Rows A
,
To work out the answer for the 1st row and 1st column:
The "Dot Product" is where we multiply matching members, then sum up:
We match the 1st members (1 and 7), multiply them, likewise for the 2nd
members (2 and 9) and the 3rd members (3 and 11), and finally sum them
up.
Want to see another example? Here it is for the 1st row and 2nd column:
We can do the same thing for the 2nd row and 1st column:
And we get:
DONE!
The multiplication of two matrices if the dimensions of the matrices conform in
the following manner: When A is ( n X k ) and B is ( k X p), so that the number
of elements in a row of A is the same as the number of elements in a column
of B, we can form the matrix product AB. An element of the new matrix AB is
formed by taking the inner product of each row of A with each column of B.
3×5=5×3
(The Commutative Law of Multiplication)
But this is not generally true for matrices (matrix multiplication is not
commutative):
AB ≠ BA
When we change the order of multiplication, the answer is (usually) different.
Example:
See how changing the order affects this multiplication:
It can have the same result (such as when one matrix is the Identity Matrix)
but not usually.
And there are special ways to find the Inverse, which is explained later.
Transposing
To "transpose" a matrix, swap the rows and columns.
; ⟶
; :
Notation
A matrix is usually shown by a capital letter (such as A, or B)
A Matrix
(This one has 2 Rows and 2 Columns)
The determinant helps us find the inverse of a matrix, tells us things about
the matrix that are useful in systems of linear equations, calculus and more.
Symbol
The symbol for determinant is two vertical lines either side.
Example:
For a 2×2 Matrix
For a 2×2 matrix (2 rows and 2 columns):
|A| = ad − bc
"The determinant of A equals a times d minus b times c"
′
∴
Reciprocal of a Number
Why not 1/A ? Because we don't divide by a matrix! And anyway 1/8 can also
be written 8-1
8 × (1/8) = 1
A × A-1 = I
(1/8) × 8 = 1
A-1 × A = I
1. The inverse of A is A-1 only when A × A-1 = A-1 × A = I.
2. To find the inverse of a 2x2 matrix: swap the positions of a and d, put negatives in
front of b and c, and divide everything by the determinant (ad-bc).
3. Sometimes there is no inverse at all.
10 × 0.5 = 5
XA = B
It would be nice to divide both sides by A (to get X=B/A), but remember we
can't divide.
XAA-1 = BA-1
XI = BA-1
We can remove I (for the same reason we can remove "1" from 1x = ab for
numbers):
X = BA-1
First of all, to have an inverse the matrix must be "square" (same number of
rows and columns).
But also the determinant cannot be zero (or we end up dividing by zero).
How about this:
And it makes sense ... look at the numbers: the second row is just double
the first row, and does not add any new information.
Square matrices are best understood in terms of quantities called eigenvalues and
eigenvectors.
A vector that after transformation has not changed at all except by a scalar value
known as the eigenvalue.
λ
Let A be an n×n matrix. A scalar λ is called an eigenvalue of A if there is a
nonzero vector such that λ . Such a vector is called eigenvector of A
corresponding to λ.