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=[a11a21a12a22],B=[b11b21b12b22]Then:
A+B=[a11+b11a21+b21a12+b12a22+b22]Scalar Multiplication
You can also multiply a matrix by a scalar (single number):
k⋅A=[ka11ka21ka12ka22]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=[1324], 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=[1324]Then:
AT=[1234]Properties:
- (AT)T=A;
- (A+B)T=AT+BT;
- (AB)T=BTAT.
Determinant of a Matrix
2×2 Matrix
For:
A=[acbd]The determinant is:
det(A)=ad−bc3×3 Matrix
For:
A=adgbehcfiThe 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=[acbd]Then its inverse matrix A−1 is:
A−1=det(A)1[d−c−ba]Where det(A)=0.
フィードバックありがとうございます!
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください