Skip to main content

Module 4: Linear Algebra: Case Studies

These cases show vectors and matrices as tools for representation, transformation, and measurement.


Case Study 1: User Preferences as Vectors

Scenario: A recommendation prototype stores user interests as free-form tags. Similar users are hard to compare because every profile has a different shape.

Source anchor: Khan Academy: Matrix transformations.

Module concepts:

  • vectors
  • dimensions
  • dot product intuition
  • normalization

Wrong Approach

Compare profiles by reading tags manually.

Better Approach

Represent each user as a vector over a shared feature space. Use dot product or cosine similarity with normalization so high-activity users do not dominate only because they have more entries.

Tradeoff Table

ChoiceGainCost
Free-form tagsFlexibleHard to compare
Feature vectorsComputable similarityNeeds feature design
Learned embeddingsRicher semanticsHarder to inspect

Failure Mode

The system recommends users with many tags rather than similar interests.

Required Artifact

Create a feature vector table for three users and compute one similarity comparison by hand.

Project / Capstone Connection

Use this vector-table format later when explaining recommendation, ranking, embedding, or feature-space choices in capstone artifacts.


Case Study 2: Image Transformations With Matrices

Scenario: A simple graphics tool rotates and scales icons. A learner applies transformations in the wrong order and gets unexpected placement.

Source anchor: Khan Academy: Matrix transformations.

Module concepts:

  • matrix transformations
  • composition order
  • coordinate systems
  • geometric interpretation

Wrong Approach

Treat rotation and scaling as interchangeable operations.

Better Approach

Represent each transformation as a matrix and multiply in the correct order for the coordinate convention. Test with a simple point so the visual result is explainable.

Tradeoff Table

ChoiceGainCost
Trial-and-error transformsQuick visual feedbackNo reliable reasoning
Matrix modelPredictable compositionRequires convention clarity
Graphics library onlyLess math codeCan hide order mistakes

Failure Mode

An icon scales around the wrong origin after a rotation.

Required Artifact

Write a two-step transformation calculation for one point and explain why reversing the order changes the result.

Project / Capstone Connection

Carry this transformation-order explanation into graphics, simulation, or data-pipeline work where composition order changes meaning.


Case Study 3: Solving Linear Constraints in Resource Planning

Scenario: A small team allocates hours across product, support, and maintenance. Constraints are linear, but the plan is adjusted by intuition and repeatedly overcommits people.

Source anchor: Khan Academy: Matrix transformations.

Module concepts:

  • systems of equations
  • matrices
  • constraints
  • feasibility

Wrong Approach

Change one allocation at a time without checking the full system.

Better Approach

Model the constraints as equations or inequalities, solve the system when possible, and identify when the requested work is infeasible.

Tradeoff Table

ChoiceGainCost
Manual adjustmentFast discussionHidden infeasibility
Linear modelClear constraintsSimplifies reality
Optimization toolHandles more casesMore setup

Failure Mode

The plan looks balanced in one category but exceeds total available hours.

Required Artifact

Create a matrix or equation system for three work categories and solve or mark infeasible.

Project / Capstone Connection

Reuse this feasibility framing later when project scope, staffing, or resource allocation problems need a defensible constraint model.


Case Study 4: Movement In A 2D Game Uses Vector Addition

Scenario: A simple game moves a character by updating x and y separately in ad hoc ways. Diagonal movement is faster than horizontal movement, and knockback effects stack strangely.

Source anchor: 3Blue1Brown: Essence of Linear Algebra is a useful intuition-first anchor for vectors as direction-and-magnitude objects rather than just number pairs.

Module concepts:

  • vector addition
  • magnitude
  • normalization
  • coordinate representation

Wrong Approach

Treat each axis update as an unrelated special case.

Better Approach

Represent movement and force as vectors, add them, then normalize where the game logic requires constant-speed movement independent of direction.

Tradeoff Table

ChoiceGainCost
separate axis tweaksquick to prototypeinconsistent behavior
vector modelcoherent movement mathrequires geometric thinking
normalized movementstable speedextra computation and conventions

Failure Mode

Diagonal movement becomes unintentionally stronger because the combined vector magnitude is larger than a single-axis move.

Required Artifact

Compute the resulting vector for right movement plus upward knockback, then compare raw and normalized magnitudes.

Project / Capstone Connection

Use this vector-addition explanation later in graphics, simulation, robotics, or recommendation work where combining signals has real geometric meaning.


Case Study 5: Feature Scaling Distorts Similarity

Scenario: A matching tool compares candidates using years of experience, interview score, and portfolio count. Experience ranges from 0 to 20 while the other features are much smaller, so one dimension dominates the similarity calculation.

Source anchor: 3Blue1Brown: Essence of Linear Algebra gives the right intuition for vectors as geometric objects whose direction and magnitude both matter.

Module concepts:

  • vector magnitude
  • scaling
  • similarity
  • normalization

Wrong Approach

Compute similarity directly on raw feature values without inspecting scale differences.

Better Approach

Choose a shared feature space, normalize or rescale dimensions where needed, and explain whether magnitude should represent strength, volume, or merely measurement units.

Tradeoff Table

ChoiceGainCost
raw feature vectorsminimal preprocessingone dimension can dominate
normalized vectorsfairer comparisonloses some magnitude information
weighted scalingdomain-aware controlrequires justified weights

Failure Mode

The system claims two candidates are similar mainly because one large-scale feature overwhelms the rest of the vector.

Required Artifact

Construct two candidate vectors, compute similarity before and after scaling, and explain what changed.

Project / Capstone Connection

Use this scaling explanation later in search, recommendation, ranking, or ML-feature discussions where numeric representation choices shape system behavior.


Source Map

SourceUse it for
Khan Academy: Matrix transformationsAnchoring transformation order, matrix composition, and geometric reasoning in approachable examples.
3Blue1Brown: Essence of Linear AlgebraBuilding intuition for vectors, scaling, magnitude, and linear transformations as geometric objects rather than disconnected formulas.