← Dennis Pezan
MA103 · WPR 2 Practice · 184 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.

From the course director: WPR 2 "will be much more computational than WPR 1. Students will still have to understand and interpret their results, but they will also have to demonstrate their computational ability with vector and matrix operations."

Plan accordingly. WPR 1 rewarded interpretation and asked for very little arithmetic; this one asks for both. No formula sheet is provided here, on the assumption WPR 2 follows WPR 1 in not providing one. You are expected to know the magnitude, dot product, cosine, determinant and inverse formulas cold. The reference card is the list to memorize, and its drills are where you build speed.

Start with the Gate 3 mirror. Gate 3 has been returned: 25 points, seven questions, all computation. That page rebuilds it question for question with new numbers, and it is the closest thing to a preview of WPR 2 that exists.

Total points
184
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 · 40 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 and unit vectors. On Gate 3
10 pts

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

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

(b) Find the unit vector in the direction of u, and the unit vector in the direction of t. Give exact values: fractions, not decimals.

û =    t̂ =

(c) How can you check a unit vector is correct without redoing the division?

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. On Gate 3
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  e462284.00⟨0.77, 0.70, 1.00⟩
C12 Lewis  l450263.96⟨0.75, 0.65, 0.99⟩
C03 Carter  c388403.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. pTA
  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: w2 = ⟨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 w3 = ⟨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

These are no longer predictions. Gate 3 has come back, and it is the only graded work this block: 25 points, seven questions, 100% computation: not one item asked for a sentence. Gates 1 and 2 put 10 of 25 points on a caption; Gate 3 put none. The Gate 3 mirror rebuilds it question for question.

1 · Unit vectors3 of 25 points on Gate 3, and absent from HW3's Section 1 list. Divide every component by the magnitude, leave it in fractions, and check the result has length 1. Question 2(b) here.
2 · Angle, not cosine similarityGate 3's rubric names "calculates cosine similarity instead of angle" as a major error worth 2 of 4. cos θ is an intermediate value. Question 5 here.
3 · Exact values and fractionsGate 3 demanded "no decimals" on the magnitude and "exact values" on the unit vector, and its row reduction came out 7/3 and 4/3. An ugly fraction is not evidence of an error.
4 · Row reduction, by row reductionSolving by substitution and writing the right answer scored 2 of 4. The REF must appear on the page and the solution type must be stated. RREF is not required. The grader noted the REF is not unique.
5 · Answering both halvesThe determinant item wanted the value and whether the inverse exists. Correct determinant with no existence conclusion dropped from 4 to 2.
6 · Sign errorsThe arithmetic that actually bites: (−8)2 = +64, (−1)(−2) = +2, and 10 − (−3) = 13. Gate 3 is almost entirely signed arithmetic.
7 · Showing workEvery Gate 3 rubric deducts a point for a correct answer with no work shown. Free points, lost silently.

Still worth knowing: the WPR is longer than a gate and the course director has said cadets "will still have to understand and interpret their results." The conceptual traps in Parts II and V (scale before similarity, scaling a vector leaves cosine unchanged, det = 0 means not unique rather than no solution) are the likeliest place for that to show up.

If you are short on time

Work the Gate 3 mirror first: seven questions, 25 points, the exact format of the only graded work this block. Then Questions 2, 3, 4, 5, 16, 19, 20, 22, 24 here, which cover every Gate 3 shape at more length plus the matrix mechanics the gate sampled only once. If time remains, Questions 8, 10 and 11 are the conceptual items most likely to carry the interpretation points.

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 = −2u18. 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 pNo change at all23. Classifyunique / none / infinite
13. Blend⟨0.722, 0.820, 0.904⟩24. Fw0.795 / 0.768 / 0.777
14. CT3×225. New weightsCarter wins, 0.882