← Dennis Pezan
MA103 · WPR 2 Practice · 180 pts

WPR 2 Practice Examination

Modeling with linear algebra — the platoon assignment problem

This is unofficial review material prepared by the course CIC for the study session. It is not the WPR and is not drawn from any secured assessment. Coverage follows the published lesson objectives for Lessons 23–32 — the Mini Block, Modeling with Linear Algebra — and the conventions of Homework 3, PSL 3, and TL 4.

Per the course director, study your gate and work the homework problems. The application sections here use platoon_roomate_data, the synthetic dataset she provided, so the practice lines up with the homework you are already doing.

Assumption worth knowing: WPR 1 provided no formula sheet, so none is provided here. Unlike WPR 1, this block is computation-heavy — you are expected to know the magnitude, dot product, cosine, determinant and inverse formulas cold. The reference card is the list to memorize.

Total points
180
Authorized
Calculator only
Coverage
Lessons 23–32
  1. Show your work. Component-by-component for vector arithmetic, entry-by-entry for matrix products. A bare answer earns partial credit at best.
  2. Give exact values where they are exact (√36 = 6, not 6.00). Round only when the question says to, and then to four decimal places for cosine similarity, two elsewhere.
  3. Every interpretation must be written in context. "The dot product is 8" is not an interpretation.
  4. Before computing any product, check that it is defined and state the dimensions of the result. Several questions award points for that check alone.
  5. Several questions ask you to carry a value forward. If you could not get the earlier value, state your assumption and continue — follow-on credit applies.

Situation. You are the executive officer of a 30-soldier platoon preparing for a field problem. The commander must (1) assign roommates by pairing soldiers with similar profiles, and (2) rank the platoon for a limited number of school slots using a weighted score. Every soldier is on record with three measures: AFT score (max 600), weapons qualification (hits out of 40), and high school GPA (max 4.00). The roster is platoon_roomate_data.xlsx, 30 soldiers, C01–C30.

Part I · 36 points

Vector Mechanics

Lessons 23–24. Component arithmetic, magnitude, the dot product, and the tests for orthogonal and parallel.

Use these vectors for all of Part I:

u⃗ = ⟨4, −2, 4⟩    v⃗ = ⟨2, 2, −1⟩    w⃗ = ⟨−8, 4, −8⟩    t⃗ = ⟨0, 3, 4⟩
1.
Vector arithmetic.
6 pts

Compute each by hand, component by component.

  1. u⃗ + v⃗ =
  2. v⃗ − u⃗ =
  3. 3u⃗ =
  4. 2u⃗ − v⃗ =
2.
Magnitude.
6 pts

Compute the magnitude of each vector. Show the work for at least one.

|u⃗| =    |v⃗| =    |w⃗| =    |t⃗| =

3.
Dot product.
6 pts

Compute each dot product algebraically. Show your work.

(a) u⃗·v⃗ =    (b) u⃗·w⃗ =    (c) u⃗·t⃗ =

4.
Orthogonality and parallelism.
8 pts

Use your results from Questions 2 and 3.

  1. Are u⃗ and v⃗ orthogonal? State the test you used and your conclusion.
  2. Are u⃗ and w⃗ parallel? State the test you used and your conclusion.
  3. Can two vectors be both orthogonal and parallel? Explain.
5.
Angle between vectors.
4 pts

Compute the angle θ between u⃗ and t⃗. Give cos θ exactly and θ to one decimal place.

cos θ =    θ =

6.
Defined or undefined.
6 pts

For each expression, state whether it is defined or undefined. If defined, give the type of the result (scalar or vector). If undefined, say why.

  1. u⃗ · (v⃗ + w⃗)  
  2. |u⃗| + v⃗  
  3. (u⃗ · v⃗) · w⃗  
Part II · 44 points

Vectors as Data

Lessons 25–26. Soldiers as feature vectors, why scale matters, and cosine similarity as a matching score.

Three soldiers are drawn from the roster. Each is represented in ℝ3 by normalizing every measure onto a 0–1 scale — AFT ÷ 600, weapons qualification ÷ 40, GPA ÷ 4.00 — rounded to two decimals, exactly as the Spotify features were scaled in PSL 3.

Three soldiers, raw and normalized
SoldierAFTWeaponsGPANormalized vector
C05 Evans  e⃗462284.00⟨0.77, 0.70, 1.00⟩
C12 Lewis  l⃗450263.96⟨0.75, 0.65, 0.99⟩
C03 Carter  c⃗388403.03⟨0.65, 1.00, 0.76⟩
7.
Reading the representation.
5 pts
  1. In what space do these vectors live, and what does the dimension of the space correspond to in this problem?
  2. Without computing anything: which single measure separates Carter from the other two most dramatically, and which measure are Evans and Lewis closest on?
8.
Why normalize at all?
8 pts

A cadet argues the normalization step is busywork and computes similarity directly on the raw numbers instead — Evans as ⟨462, 28, 4.00⟩, and so on.

  1. Compute |⟨462, 28, 4.00⟩| and state, to the nearest percent, how much of the value under the square root comes from the AFT component alone.
  2. Explain what goes wrong with raw-scale similarity, and why normalizing fixes it.
9.
Magnitude in context.
6 pts

Compute the three magnitudes to four decimal places.

|e⃗| =    |l⃗| =    |c⃗| =

A squad leader says: "Evans has the largest magnitude, so Evans is the best soldier of the three." Is that a valid reading? Explain what magnitude does and does not measure here.

10.
Cosine similarity as a roommate match.
10 pts

The commander pairs roommates by profile similarity. Evans needs a roommate: the candidates are Lewis and Carter.

  1. Compute e⃗·l⃗ and e⃗·c⃗.
  2. Compute both cosine similarities to four decimal places.
    cos(e⃗, l⃗) =    cos(e⃗, c⃗) =
  3. Which soldier do you assign as Evans' roommate? Justify with the numbers and with the feature values.
11.
Scaling a preference vector.
6 pts

The commander keeps a priority vector p⃗ = ⟨0.5, 0.3, 0.2⟩ describing what the platoon values, and ranks soldiers by their cosine similarity to it. A staff officer proposes replacing it with 2p⃗ = ⟨1.0, 0.6, 0.4⟩ "to make the priorities count for more."

Would this change any soldier's cosine similarity? Would it change the ranking? Justify using the definition of cosine similarity.

12.
Reading small cosine differences.
4 pts

Every cosine similarity in Question 10 came out above 0.95, even for two soldiers with clearly different profiles. Explain why the values cluster so close to 1 in this dataset, and what that means for how you should read them.

13.
Linear combination.
5 pts

The commander wants a description of the "average" of a fire team built 60% from Evans' profile and 40% from Carter's.

  1. Compute b⃗ = 0.6e⃗ + 0.4c⃗, component by component.
  2. Before computing anything further: will b⃗ be closer to e⃗ or to c⃗ in cosine similarity? Explain your reasoning.
Part III · 28 points

Matrix Mechanics

Lessons 27–28. Dimensions, transpose, the arithmetic, and when a product is legal at all.

Use these for all of Part III:

A = [ 3  1 ]
[ 2  4 ]
B = [ 1  2 ]
[ 0  5 ]
C = [ 1  0  2 ]
[ 3  1  4 ]
p⃗ = [ 2 ]
[ 1 ]
q⃗ = [ 1 ]
[ 0 ]
[ 3 ]
14.
Dimensions and transpose.
6 pts
  1. State the dimensions of A, C, p⃗ and q⃗.  
  2. Write CT and give its dimensions.
  3. The platoon roster is a 30 × 3 matrix F. What does a row of FT represent? What does a column represent?
15.
Addition and scalar multiplication.
8 pts

Compute each. Show your work.

(a) A + B    (b) A − B    (c) 4A    (d) 2A − 3B

16.
Is the product defined?
6 pts

For each product: state whether it is defined, give the dimensions of the result, and if defined, compute it.

  1. Ap⃗
  2. Cq⃗
  3. p⃗TA
  4. Aq⃗
17.
Matrix multiplication and commutativity.
8 pts
  1. Compute AB. Show at least one entry as an explicit row-times-column dot product.
  2. Compute BA.
  3. Is AB = BA? What does your answer tell you about matrix multiplication?
Part IV · 46 points

Determinants, Inverses & Systems

Lessons 29–31. Invertibility, the inverse method, row reduction, and what a singular system is telling you.

Continue with A = [ 3 1 ; 2 4 ] and B = [ 1 2 ; 0 5 ], and add D = [ 2 4 ; 3 6 ].

18.
Determinants and invertibility.
6 pts

Compute det(A), det(B), det(D). For each, state whether the matrix has an inverse.

19.
The inverse.
8 pts
  1. Compute A−1.
  2. Verify by computing AA−1 and confirming you get the identity. Show the multiplication.
20.
Solving a system by the inverse method.
8 pts

The commander budgets weekly training hours across two activities. Let x1 be hours of physical training and x2 be hours on the range. Two readiness requirements must be met exactly:

3x1 + x2 = 11      2x1 + 4x2 = 14
  1. Write the system in the form Ax⃗ = b⃗, identifying A, x⃗ and b⃗.
  2. Solve using x⃗ = A−1b⃗. Show the multiplication.
  3. Verify by substitution, and state the answer in context.
21.
A singular matrix.
8 pts

Consider D = [ 2  4 ; 3  6 ].

  1. You found det(D) = 0. What does that tell you about D−1?
  2. The rows of D are related. Describe the relationship, and connect it to the determinant.
  3. Treat each row as a line in the plane. Describe what a singular system looks like geometrically, and what that means for the number of solutions.
22.
Row reduction.
10 pts

Solve the following system by row reduction. Write the augmented matrix first, then show each row operation you apply and name it.

x + y + z = 6     2x − y + z = 3     x + 2y − z = 2

x =    y =    z =

23.
Classifying the solution set.
6 pts

Each matrix below is already in row echelon form. Classify the system as having a unique solution, no solution, or infinitely many solutions, and say how you can tell.

  1. [ 1  2 | 3 ; 0  1 | 4 ]   
  2. [ 1  2 | 3 ; 0  0 | 5 ]   
  3. [ 1  2 | 3 ; 0  0 | 0 ]   
Part V · 26 points

Matrices as Data

Lesson 32 and synthesis. One matrix–vector product replacing thirty dot products, and why that is the whole point of the block.

The commander must rank soldiers for a limited number of school slots. She assigns importance weights to the three measures and scores every soldier as a weighted sum. Using the same three soldiers, the feature matrix and weight vector are:

F = [ 0.77  0.70  1.00 ]  Evans
[ 0.75  0.65  0.99 ]  Lewis
[ 0.65  1.00  0.76 ]  Carter
w⃗ = [ 0.5 ]  AFT
[ 0.3 ]  weapons
[ 0.2 ]  GPA
24.
Scoring by matrix–vector multiplication.
10 pts
  1. Check that Fw⃗ is defined and state the dimensions of the result.  
  2. Compute Fw⃗. Show each entry.
  3. What does each entry of the result represent? Who ranks first?
  4. The full roster is 30×3. If the commander scored all 30 soldiers this way, what would the dimensions of Fw⃗ be, and how many dot products would that single product be performing?
25.
What the weights control.
8 pts
  1. A new commander cares far more about marksmanship: w⃗2 = ⟨0.2, 0.6, 0.2⟩. Recompute the three scores and give the new ranking.
  2. Compare to your answer in Question 24. What does this tell you about weighted scoring?
  3. A third officer proposes w⃗3 = ⟨1.0, 0.6, 0.4⟩, "to weight everything more heavily." What happens to the scores, and what happens to the ranking?
26.
Connecting to predictive modeling.
4 pts

On WPR 1 you fit a linear regression ŷi = b0 + b1xi. Suppose you build a matrix X whose first column is all 1s and whose second column holds the x values, and a vector β⃗ = [b0; b1].

What does each row of the product Xβ⃗ compute? Why must the number of columns of X equal the number of rows of β⃗?

27.
One language.
4 pts

In two to three sentences, explain how the dot product, cosine similarity, and matrix–vector multiplication are all the same operation wearing different clothes. Refer to at least two of the problems you worked in this exam.

Study guidance

The course director's recommendation: work your gate and the homework problems. This exam is built to sit alongside them, on her dataset.

Where points go

Unlike the WPR 1 sheet, these are predictions, not confirmed misses — Gate 3 has not been graded yet. They come from the shape of HW3, PSL 3 and TL 4, and from the two patterns that actually burned people on Gates 1 and 2.

1 — Scale before similarityQuestion 8. Raw AFT scores account for 99.6% of a raw magnitude. Any similarity computed on unnormalized features is just an AFT comparison in disguise. Same logic as standardizing before KNN.
2 — Scaling a vector changes nothing about cosineQuestion 11. PSL 3 asks this exact question. Doubling a preference vector doubles the dot product and the magnitude; they cancel. Cosine sees angle only.
3 — Magnitude is not qualityQuestion 9. A big magnitude means a big overall profile, not a better soldier, and two very different soldiers can have nearly identical magnitudes.
4 — The dot product is a scalarQuestion 3. Stopping at the component-wise products and reporting a vector is the most common mechanical error in the block.
5 — Checking that a product is definedQuestions 16 and 24. Inner dimensions must match; the result takes the outer ones. Points are awarded for the check itself, so never skip it.
6 — AB ≠ BAQuestion 17. And entry-by-entry multiplication is not matrix multiplication at all.
7 — det = 0 means "not unique", not "no solution"Question 21. A singular system is either inconsistent or has infinitely many solutions, and only row reduction tells you which.
8 — Interpreting in contextEvery application item. This is what cost the most points on Gates 1 and 2, in a block where it is tempting to stop at the arithmetic. Name the soldier, name the units, say what the commander should do.

If you are short on time

Work Questions 2, 3, 4, 8, 10, 11, 16, 19, 20, 22, 24 — 84 points covering every mechanic that is likely to be tested (magnitude, dot product, the orthogonal and parallel tests, cosine similarity, defined-or-not, the inverse, the inverse method, row reduction, and matrix–vector scoring) plus the two conceptual traps most likely to appear. Leave the synthesis items for a second pass.

Work these alongside it

Answer key at a glance

ItemAnswerItemAnswer
2. Magnitudes6, 3, 12, 516. Undefined one(d) Aq⃗, 2≠3
3. Dot products0, −72, 1017. AB / BA[3 11; 2 24] / [7 9; 10 20]
4. Relationshipsu⃗⊥v⃗, w⃗ = −2u⃗18. Determinants10, 5, 0
5. Anglecos θ = 1/3, 70.5°19. A−1(1/10)[4 −1; −2 3]
8. AFT share of raw99.6%20. Training hours3 PT, 2 range
9. Magnitudes1.4432 / 1.4018 / 1.414221. det(D) = 0rows: R2 = 1.5·R1
10. Cosines0.9997 / 0.9605 → Lewis22. Row reduction(1, 2, 3)
11. Doubling p⃗No change at all23. Classifyunique / none / infinite
13. Blend⟨0.722, 0.820, 0.904⟩24. Fw⃗0.795 / 0.768 / 0.777
14. CT3×225. New weightsCarter wins, 0.882