Operations on two matrices
|
|
|
|
|
|
Matrices overview
![Print SI derived units list](/Images/Buttons/print3.png)
The notation of a matrix of size (m ✕ n) is defined as A(m ✕ n) = A(rows, columns)
A convenient shorthand which offers considerable advantage when working with system of
linear equations is by using the matrix notation.
Consider the set of linear equations of the form:
![Linear set of equationsn](/MathCalc/Matrix/Equations/eq21.png)
In matrix notation these equations may be represented as:
![Linear set of equationsn in matrix form](/MathCalc/Matrix/Equations/eq22.png)
or AX = C
The terms of the matrix can be represented as:
![Short representation of matrices](/MathCalc/Matrix/Equations/eq23.png)
Distributive law |
Left side A(B + C) = AB + AC
Right side (A + B)C = AC + BC
|
A(m ✕ n) B and C (n ✕ p)
A and B (m ✕ n) C(n ✕ p)
|
||
Associative law |
Addition (A + B) + C = A + (B + C)
Multiplication (AB)C = A(BC)
|
(m ✕ n)
(n ✕ n)
|
||
Scalar multiplication | (kA)B = A(kB) = k(AB) |
A(m ✕ n) B(n ✕ p) k any number |
||
Commutative law |
Addition A + B = B + A
Multiplication not commutative
|
A and B (m ✕ n)
Because A∙B ≠ B∙A
|
||
Other algebraic laws (k, v are constants) |
0 + A = A
k(A + B)= kA + kB
1 · A = A
(k + v)A = kA + vA
0 · A = 0
k(vA) = (kv)A
A + (−A) = 0
kA = 0 → k = 0 or A = 0
(−1)A = A
|
|||
Matrices powers (c is constant) |
|
Matrices Types
![Print SI derived units list](/Images/Buttons/print3.png)
Matrices addition and multiplication
![Print SI derived units list](/Images/Buttons/print3.png)
Matrices addition: A and B are of the same size m × n
![Matrices addition](/Equations/Matrix/Eq/eq2.png)
Scalar multiplication:
![Scalar multiplication](/Equations/Matrix/Eq/eq3.png)
Matrices multiplication A (m × n) ∙ B (n × p) = C (m × p)
![Matrices multiplication](/Equations/Matrix/Eq/eq4.png)
Example:
![Matrices multiplication example](/Equations/Matrix/Eq/eq5.png)
![Matrices multiplication example](/Equations/Matrix/Eq/eq6.png)
Determinants
![Print SI derived units list](/Images/Buttons/print3.png)
Determinants - symbol: det A or |A|
The result of the determinant of a matrix (n ⨯ n) is a real number.
Size 2 matrix
![](/MathCalc/Matrix/Equations/eq1.png)
Size 3 matrix
![](/MathCalc/Matrix/Equations/eq2.png)
General form to evaluate determinant values:
![](/MathCalc/Matrix/Equations/eq3.png)
In this formula Min is the determinant of the submatrix of A obtained by deleting its ith row and nth column.
The determinant Min is called the minor of the element ain and his size
is (n-1) ⨯ (n-1).
Cofactors of matrix Aij
It is convenient to consolidate the quantity (-1)i+j and the minor Mij .
We define the cofactor Aij of the element aij in
determinant A as: Aij = (-1)i+jMij
Determinant’s properties:
![](/MathCalc/Matrix/Equations/eq5.png)
Example: Find the value of the determinant:
![](/MathCalc/Matrix/Equations/eq4.png)
det A = 1 (1 * 2 − (- 1)(- 1))-(-2)(2 * 2 - (-1)(-2)) + 3 (2 * (-1) - 1 * (-2))
det A = 1 (2 − 1) + 2 (4 − 2) + 3 (− 2 + 2) = 5
Transposed matrix AT
![Print SI derived units list](/Images/Buttons/print3.png)
Transposed matrix AT
Interchange of terms across the main diagonal
Interchange of terms across the main diagonal
![](/MathCalc/Matrix/Equations/eq6.png)
Transposed matrices properties:
![](/MathCalc/Matrix/Equations/eq7.png)
Example:
Find the transposed of the matrix.
Find the transposed of the matrix.
![](/MathCalc/Matrix/Equations/eq8.png)
Note: The transposed size of an m ⨯ n matrix is n ⨯ m.
Inverse matrix A-1
![Print SI derived units list](/Images/Buttons/print3.png)
Inverse matrix A-1 = B
The matrix A is inversible if there is a matrix B so that:
AB = BA = I then the matrix B is the inversed matrix of A.
Matrix I is the unit matrix. Thus the solution of A X = B can be written in the form X = A-1 B (where A is an n x n matrix and X and B are n x 1 matrices).
AB = BA = I then the matrix B is the inversed matrix of A.
Matrix I is the unit matrix. Thus the solution of A X = B can be written in the form X = A-1 B (where A is an n x n matrix and X and B are n x 1 matrices).
Inversed matrices properties:
![](/MathCalc/Matrix/Equations/eq9.png)
Example: Find the inverse of matrix A
![](/MathCalc/Matrix/Equations/eq10.png)
1. Add the unit matrix at the right:
![](/MathCalc/Matrix/Equations/eq11.png)
2. Multiply first row by -2 and add it to the second row then multiply first row by -4 and add it to the third row to obtain:
![](/MathCalc/Matrix/Equations/eq12.png)
3. Add second and third rows to obtain:
![](/MathCalc/Matrix/Equations/eq13.png)
4. Subtract third row from second row:
![](/MathCalc/Matrix/Equations/eq14.png)
5. Finally multiply third row by 2 and add it to the first row and multiply third row by -1 to get the unit matrix:
![](/MathCalc/Matrix/Equations/eq15.png)
And the inverse of A is:
![](/MathCalc/Matrix/Equations/eq16.png)
Rank of a matrix A
![Print SI derived units list](/Images/Buttons/print3.png)
Rank of matrix A
A square matrix is said to be non-singular, if its determinant is not zero. The rank of an m ⨯ n matrix is
the largest integer r for which a non-singular r ⨯ r submatrix exists.
If A and B are an n ⨯ n matrices then: rank(A + B) ≤ rank A + rank B
Example: Find the rank of matrix A (4X3).
![](/MathCalc/Matrix/Equations/eq17.png)
1. Multiply first row by 2 and add it to the second row.
2. Multiply first row by -3 and add it to the third row.
3. Subtract fourth row from the first row to get:
2. Multiply first row by -3 and add it to the third row.
3. Subtract fourth row from the first row to get:
![](/MathCalc/Matrix/Equations/eq17.png)
4. Add second row to the third row.
5. Subtract fourth row from second row to obtain:
5. Subtract fourth row from second row to obtain:
![](/MathCalc/Matrix/Equations/eq18.png)
6. Add 2nd row to the 3rd row.
7. Add 3rd row to the 4th row to get:
7. Add 3rd row to the 4th row to get:
![](/MathCalc/Matrix/Equations/eq20.png)
8. Remove the all 0 row to get the final 3 X 3 matrix.
![](/MathCalc/Matrix/Equations/eq20a.png)
And the rank of matrix A is 3.
Scaling Matrices
![Print SI derived units list](/Images/Buttons/print3.png)
Enlarging or shrinking a vector can be done by multiplying the vector by the diagonal matrix of the form:
![Scaling matrix](/MathCalc/Matrix/Equations/scaling.png)
If a = b = c > 1
Then the vector is enlarging equally in all directions.
If a = b = c < 1
Then the vector is shrinking equally in all directions.
If a ≠ b ≠ c
Then the vector is scaling in different sizes in the x, y and z directions.
Eigenvalues and eigenvectors
![Print SI derived units list](/Images/Buttons/print3.png)
Eigenvalues and eigenvectors |
The system (λI − A) = 0 has a non trivial solution if and only if
det |λI − A| = 0. If P denote the matrix of the eigenvectors and B denote
the diagonal matrix with diagonal elements being the eigenvalues λi of A.
![]() |
||||||||||||||||||||
![]()
The eigenvalues are the roots of the characteristic polynomial, and are:
− 2, − 2, 4 this values are the diagonal values and has the same determinant
value as matrix A. In order to find the eigenvectors, substitute first solution
λ =− 2 into the characteristic matrix, the result is:
![]()
Perform the same process with the third solution λ = 4 to get:
![]()
We can see that the result is matching to the definition of the eigenvectors and eigenvalues:
![]() |
Rotation Matrices
![Print SI derived units list](/Images/Buttons/print3.png)
Rotation of a vector is performed by applying the rotation matrix R on the vector V. V' = R × V |
If the rows and columns of a rotation matrix R are orthogonal to
each other and of unit length then the following relations are true:
RT = R− 1 RT R = RRT = I detR = 1
|
||||||||||
Two-dimensional rotation | |||||||||||
Rotation by θ counterclockwise | ![]() |
+θ counterclockwise −θ clockwise |
|||||||||
Rotation by θ clockwise | ![]() |
sin(−θ) = −sinθ cos(−θ) = cosθ |
|||||||||
Rotation by 90° counterclockwise | ![]() |
||||||||||
Rotation by 180° counterclockwise | ![]() |
||||||||||
Rotation by 270° counterclockwise | ![]() |
||||||||||
Three dimensional rotation (θ − x axis, ϕ − y axis, φ − z axis) | |||||||||||
|
![]() |
![]() |
|||||||||
|
![]() |
![]() |
|||||||||
|
![]() |
![]() |
|||||||||
![]() |
|||||||||||
Combined rotation in the direction of all axes can be done by multiplying the three rotation matrices in the x,y and z direction |
Rotation in the direction of two axes can be done by:
|
||||||||||
clockwise rotation matrix of the axes (vector is moved counterclockwise) Note: the order of the rotation is important as rotation Rx (θ) Ry (ϕ) Rz (φ) is not equal to rotation Rz (φ) Ry (ϕ) Rx (θ). ![]() |
|||||||||||
Counterclockwise rotation matrix of the axes (vector is moved clockwise)
![]() |
|||||||||||
Example: Rotate the vector V = 2i + j
|
(Rotated vector) V ' = R × V (R - Rotation matrix)
![]() V' = 1.23i + 1.87j |
||||||||||
Example: Rotate the vector V = i + j + k by an angle of 30° counterclockwise about the x axis, 45° clockwise about the y axis and 60° clockwise about z axis. |
Step 1: rotation θ = 30° about x axis counterclockwise:
![]() ![]() ![]() |