Vector Spaces
1. Vector Space and Subspace
Introduction
A vector space is a set of vectors that can be added together and multiplied by scalars, satisfying specific axioms (closure, associativity, distributivity, etc.). Vector spaces provide the framework for linear algebra and are crucial for applications in mathematics, physics, and engineering.
A subspace is a subset of a vector space that is itself a vector space under the same operations.
Key Concepts
Vector Space: A set \( V \) with operations addition and scalar multiplication such that:
- Closure under addition and scalar multiplication.
- Existence of a zero vector.
- Additive inverses exist.
- Associativity and commutativity of addition.
- Distributive properties.
Subspace Criteria:
- The zero vector is in the subset.
- Closed under vector addition.
- Closed under scalar multiplication.
Example
- The set of all vectors \( \mathbb{R}^n \) is a vector space.
- The set of all solutions to a homogeneous linear equation \( Ax = 0 \) forms a subspace.
Visualization
Subspaces of \( \mathbb{R}^3 \): - A line through the origin. - A plane through the origin.
2. Null Space and Column Space, and Linear Transformation
Null Space
The null space of a matrix \( A \) is the set of all vectors \( \mathbf{x} \) such that:
Column Space
The column space is the span of the columns of \( A \). It represents all possible linear combinations of the columns.
Linear Transformation
A linear transformation is a mapping \( T: V \to W \) such that:
- \( T(u + v) = T(u) + T(v) \)
- \( T(cu) = cT(u) \)
Example
Given \( A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \\ 5 & 6 \end{bmatrix} \):
- Null space: Solve \( A\mathbf{x} = \mathbf{0} \).
- Column space: Span of \( \begin{bmatrix} 1 \\ 3 \\ 5 \end{bmatrix}, \begin{bmatrix} 2 \\ 4 \\ 6 \end{bmatrix} \).
Code Example
import numpy as np
from scipy.linalg import null_space
A = np.array([[1, 2], [3, 4], [5, 6]])
null = null_space(A)
print("Null Space:", null)
3. Linearly Independent Sets and Bases
Linearly Independent Sets
A set of vectors \( \{v_1, v_2, \dots, v_k\} \) is linearly independent if:
Bases
A basis is a linearly independent set of vectors that spans the vector space.
Dimension
The number of vectors in a basis is the dimension of the vector space.
Example
The standard basis for \( \mathbb{R}^3 \):
Code Example
A = np.array([[1, 2], [3, 4]])
rank = np.linalg.matrix_rank(A)
print("Rank (dimension of column space):", rank)
4. Coordinate System
Definition
A coordinate system represents a vector as a linear combination of basis vectors.
Change of Basis
To convert coordinates from one basis \( B \) to another \( C \):
Where \( P_{B \to C} \) is the change of basis matrix.
Example
Convert \( \mathbf{x} \) from basis \( B = \{\mathbf{b}_1, \mathbf{b}_2\} \) to \( C = \{\mathbf{c}_1, \mathbf{c}_2\} \).
Code Example
B = np.array([[1, 0], [0, 1]])
C = np.array([[2, 1], [1, 3]])
P = np.linalg.inv(B) @ C
print("Change of Basis Matrix:", P)
Conclusion
Vector spaces form the backbone of linear algebra, connecting concepts like independence, transformations, and applications in numerous fields. Understanding these fundamentals is crucial for advanced studies and practical problem-solving.
Exercises
- Prove that the set of all polynomials of degree at most 2 forms a vector space.
-
Find the null space and column space of the matrix:
\[ A = \begin{bmatrix} 2 & 4 \\ -1 & -2 \\ 3 & 6 \end{bmatrix} \] -
Verify if the vectors \( \{(1, 0, 0), (0, 1, 0), (1, 1, 1)\} \) are linearly independent.
- Compute the coordinates of \( \mathbf{x} = \begin{bmatrix} 3 \\ 7 \end{bmatrix} \) relative to the basis \( \{\begin{bmatrix} 1 \\ 2 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \end{bmatrix}\} \).
Solutions available upon request!