### Matrices – Notes
A **matrix** (plural: **matrices**) is a mathematical concept representing a rectangular array of
numbers, symbols, or expressions, arranged in rows and columns. Matrices are fundamental in
various fields, including linear algebra, physics, computer graphics, and machine learning.
---
### **Structure of a Matrix**
1. **Notation**:
- A matrix is typically represented by a capital letter, e.g., \( A \), \( B \), or \( M \).
- Its elements are denoted by lowercase letters with subscripts indicating their position, e.g., \
( a_{ij} \) refers to the element in the \( i \)-th row and \( j \)-th column.
2. **Dimensions**:
- A matrix of size \( m \times n \) has \( m \) rows and \( n \) columns.
Example:
\[
A=
\begin{bmatrix}
a_{11} & a_{12} & a_{13} \\
a_{21} & a_{22} & a_{23}
\end{bmatrix}
\quad \text{is a } 2 \times 3 \text{ matrix.}
\]
---
### **Types of Matrices**
1. **Square Matrix**: Number of rows = number of columns (\( m = n \)).
2. **Row Matrix**: Only one row, e.g., \( 1 \times n \).
3. **Column Matrix**: Only one column, e.g., \( m \times 1 \).
4. **Diagonal Matrix**: Non-zero elements only on the main diagonal.
5. **Identity Matrix (\( I \))**: A diagonal matrix with 1s on the diagonal.
6. **Zero Matrix**: All elements are zero.
7. **Symmetric Matrix**: \( A = A^T \), i.e., the matrix is equal to its transpose.
---
### **Operations on Matrices**
1. **Addition/Subtraction**:
Matrices can be added or subtracted if they have the same dimensions.
\[
(A + B)_{ij} = a_{ij} + b_{ij}
\]
2. **Scalar Multiplication**:
Each element of the matrix is multiplied by a scalar.
\[
(kA)_{ij} = k \cdot a_{ij}
\]
3. **Matrix Multiplication**:
Defined for matrices \( A \) of size \( m \times n \) and \( B \) of size \( n \times p \).
\[
(AB)_{ij} = \sum_{k=1}^n a_{ik}b_{kj}
\]
4. **Transpose**:
Rows become columns and vice versa.
\[
A^T =
\begin{bmatrix}
a_{11} & a_{12} \\
a_{21} & a_{22}
\end{bmatrix}^T =
\begin{bmatrix}
a_{11} & a_{21} \\
a_{12} & a_{22}
\end{bmatrix}
\]
5. **Determinant (for square matrices)**:
A scalar value representing certain properties of the matrix.
Example for a \( 2 \times 2 \) matrix:
\[
\text{det}(A) = \begin{vmatrix}
a & b \\
c&d
\end{vmatrix} = ad - bc
\]
6. **Inverse**:
If \( A \) is invertible, its inverse \( A^{-1} \) satisfies \( AA^{-1} = I \).
---
### **Applications**
1. **Solving Systems of Linear Equations**: Using methods like Gaussian elimination or matrix
inversion.
2. **Transformations in Geometry**: Matrices represent scaling, rotation, and translation.
3. **Computer Science**: Data representation, machine learning algorithms.
4. **Physics and Engineering**: Modeling systems, solving equations, simulations.
Matrices are a versatile and powerful tool across many domains of science and technology.