Linear Algebra Beginner 25 min

Interactive Linear Algebra: Matrix-Vector Multiplication

Visualize 2D matrix-vector multiplication with interactive animations. Understand linear transformations through drag-and-drop vector manipulation and real-time matrix operations.

Understanding Matrix-Vector Multiplication

Matrix-vector multiplication is one of the most fundamental operations in linear algebra. In this interactive tutorial, you'll see exactly how a 2×2 matrix transforms a 2D vector through visual animations.

Key Concept

When we multiply a matrix by a vector, we're applying a linear transformation. The matrix acts as a function that takes one vector and produces another vector, potentially changing both its direction and magnitude.

Interactive 2D Matrix-Vector Multiplication

Drag the vector endpoint (blue dot) to see how the matrix transforms it in real-time. The red vector shows the result of the matrix multiplication.

Matrix A (2×2)

Vector v

Matrix Presets

Original Vector: v = [1, 1]
Transformed: Av = [3, 1]
Determinant: 2.00
Angle: 45°

Mathematical Foundation

The multiplication of a 2×2 matrix A by a 2D vector v is defined as:

[
a₁₁ a₁₂
a₂₁ a₂₂
]
[
vₓ
vᵧ
]
=
[
a₁₁vₓ + a₁₂vᵧ
a₂₁vₓ + a₂₂vᵧ
]

Step-by-Step Calculation

Step 1: Identify Matrix and Vector Elements

From our current matrix and vector:

A = [[2, 1], [0, 1]] and v = [1, 1]

Step 2: Apply the Formula

Calculate each component of the result vector:

First component: 2×1 + 1×1 = 3
Second component: 0×1 + 1×1 = 1

Step 3: Result

The transformed vector is:

Av = [3, 1]

Visual Interpretation

Rotation

Matrices like [[0, -1], [1, 0]] rotate vectors counterclockwise by 90°.

Scaling

Matrices like [[2, 0], [0, 2]] scale vectors by a factor of 2 in both directions.

Shearing

Matrices like [[1, 1], [0, 1]] shear vectors, tilting them horizontally.

Reflection

Matrices like [[-1, 0], [0, 1]] reflect vectors across the y-axis.

Practice Problems

Problem 1: Rotation Matrix

Set the matrix to rotate by 45° and observe how it transforms the unit vector [1, 0].

Problem 2: Scaling Matrix

Create a matrix that scales by 3 in the x-direction and 0.5 in the y-direction.

Problem 3: Combined Transformation

Experiment with matrices that combine rotation and scaling.

Key Takeaways

  • Linear Transformation: Matrix-vector multiplication represents a linear transformation of space.
  • Geometric Meaning: Each matrix corresponds to a specific geometric transformation (rotation, scaling, shearing, reflection).
  • Determinant: The determinant tells us about the area scaling factor and whether the transformation preserves orientation.
  • Composition: Multiple transformations can be combined by multiplying their matrices.
  • Reversibility: If the determinant is non-zero, the transformation can be reversed using the inverse matrix.