Matrix Operations Visualization
Matrix Basics
I. Definition of Matrix
A matrix is a rectangular array of numbers. An m×n matrix consists of m rows and n columns of elements arranged in a rectangular format.
General form:
$$A = \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{bmatrix}_{m \times n}$$Where \(a_{ij}\) represents the element in the i-th row and j-th column.
II. Basic Matrix Operations
1. Matrix Addition
Two matrices of the same type (same number of rows and columns) can be added by adding corresponding elements:
2. Matrix Subtraction
Similar to addition, subtract corresponding elements:
3. Scalar Multiplication
Multiply a matrix by a scalar: each element of the matrix is multiplied by that scalar:
III. Properties of Matrix Operations
- Commutative Law: \(A + B = B + A\)
- Associative Law: \((A + B) + C = A + (B + C)\)
- Distributive Law: \(k(A + B) = kA + kB\)
- Zero Matrix: \(A + O = A\) (where O is the zero matrix)
IV. Examples
Let matrix \(A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}\), \(B = \begin{bmatrix} 5 & 6 \\ 7 & 8\end{bmatrix}\), and scalar \(k = 2\)
Addition: \(A + B = \begin{bmatrix} 6 & 8 \\ 10 & 12 \end{bmatrix}\)
Subtraction: \(A - B = \begin{bmatrix} -4 & -4 \\ -4 & -4 \end{bmatrix}\)
Scalar Multiplication: \(2A = \begin{bmatrix} 2 & 4 \\ 6 & 8 \end{bmatrix}\)