Matrix Operations
A matrix is a rectangular array of numbers arranged in rows and columns, used to represent and solve mathematical problems efficiently.
Before jumping into linear systems, like Ax=b, it's essential to understand how matrices behave and what operations we can perform on them.
Matrix Addition
You can add two matrices only if they have the same shape (same number of rows and columns).
Let:
A=[a11βa21ββa12βa22ββ],B=[b11βb21ββb12βb22ββ]Then:
A+B=[a11β+b11βa21β+b21ββa12β+b12βa22β+b22ββ]Scalar Multiplication
You can also multiply a matrix by a scalar (single number):
kβ A=[ka11βka21ββka12βka22ββ]Matrix Multiplication and Size Compatibility
Matrix multiplication is a row-by-column operation, not element-wise.
Rule: if matrix A is of shape (mΓn) and matrix B is of shape (nΓp), then:
- The multiplication AB is valid;
- The result will be a matrix of shape (mΓp).
Example:
Let:
A=[13β24β],Β Β B=[56β]A is (2Γ2) and B is (2Γ1), then AB is valid and results in a (2Γ1) matrix:
Aβ B=[1β 5+2β 63β 5+4β 6β]=[1739β]Transpose of a Matrix
The transpose of a matrix flips rows and columns. It is denoted as AT.
Let:
A=[13β24β]Then:
AT=[12β34β]Properties:
- (AT)T=A;
- (A+B)T=AT+BT;
- (AB)T=BTAT.
Determinant of a Matrix
2Γ2 Matrix
For:
A=[acβbdβ]The determinant is:
det(A)=adβbc3Γ3 Matrix
For:
A=βadgβbehβcfiββThe determinant is:
det(A)=a(eiβfh)βb(diβfg)+c(dhβeg)This method is called cofactor expansion.
- Larger matrices (4Γ4 and up) can be expanded recursively.
- The determinant is useful because it indicates whether a matrix has an inverse (non-zero determinant).
Inverse of a Matrix
The inverse of a square matrix A is denoted as Aβ1. It satisfies Aβ Aβ1=I, where I is the identity matrix.
Only square matrices with non-zero determinant have an inverse.
Example:
If matrix A is:
A=[acβbdβ]Then its inverse matrix Aβ1 is:
Aβ1=det(A)1β[dβcββbaβ]Where det(A)ξ =0.
Thanks for your feedback!
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Can you explain why matrix multiplication is not element-wise?
How do you find the determinant of larger matrices?
What is the significance of the inverse of a matrix?
Awesome!
Completion rate improved to 1.96
Matrix Operations
Swipe to show menu
A matrix is a rectangular array of numbers arranged in rows and columns, used to represent and solve mathematical problems efficiently.
Before jumping into linear systems, like Ax=b, it's essential to understand how matrices behave and what operations we can perform on them.
Matrix Addition
You can add two matrices only if they have the same shape (same number of rows and columns).
Let:
A=[a11βa21ββa12βa22ββ],B=[b11βb21ββb12βb22ββ]Then:
A+B=[a11β+b11βa21β+b21ββa12β+b12βa22β+b22ββ]Scalar Multiplication
You can also multiply a matrix by a scalar (single number):
kβ A=[ka11βka21ββka12βka22ββ]Matrix Multiplication and Size Compatibility
Matrix multiplication is a row-by-column operation, not element-wise.
Rule: if matrix A is of shape (mΓn) and matrix B is of shape (nΓp), then:
- The multiplication AB is valid;
- The result will be a matrix of shape (mΓp).
Example:
Let:
A=[13β24β],Β Β B=[56β]A is (2Γ2) and B is (2Γ1), then AB is valid and results in a (2Γ1) matrix:
Aβ B=[1β 5+2β 63β 5+4β 6β]=[1739β]Transpose of a Matrix
The transpose of a matrix flips rows and columns. It is denoted as AT.
Let:
A=[13β24β]Then:
AT=[12β34β]Properties:
- (AT)T=A;
- (A+B)T=AT+BT;
- (AB)T=BTAT.
Determinant of a Matrix
2Γ2 Matrix
For:
A=[acβbdβ]The determinant is:
det(A)=adβbc3Γ3 Matrix
For:
A=βadgβbehβcfiββThe determinant is:
det(A)=a(eiβfh)βb(diβfg)+c(dhβeg)This method is called cofactor expansion.
- Larger matrices (4Γ4 and up) can be expanded recursively.
- The determinant is useful because it indicates whether a matrix has an inverse (non-zero determinant).
Inverse of a Matrix
The inverse of a square matrix A is denoted as Aβ1. It satisfies Aβ Aβ1=I, where I is the identity matrix.
Only square matrices with non-zero determinant have an inverse.
Example:
If matrix A is:
A=[acβbdβ]Then its inverse matrix Aβ1 is:
Aβ1=det(A)1β[dβcββbaβ]Where det(A)ξ =0.
Thanks for your feedback!