Vectors and Matrices
Vectors and matrices are the fundamental objects of linear algebra. Matrices encode linear transformations and systems of linear equations.
Key Points
- Matrix multiplication corresponds to composition of linear transformations.
- The transpose swaps rows and columns; Hermitian transpose also conjugates complex entries.
- Special matrices (identity, diagonal, orthogonal) have useful computational properties.
Formulas
Matrix-vector product
$$(A\mathbf{x})_i = \sum_{j} A_{ij} x_j$$
Matrix product
$$(AB)_{ij} = \sum_{k} A_{ik} B_{kj}$$
Transpose
$$(A^\top)_{ij} = A_{ji}$$
Code Example
import numpy as np
A = np.array([[1, 2], [3, 4]])
x = np.array([5, 6])
print(A @ x) # [17, 39]