M03 · optional contextual support
Trace vectors through a matrix
Compute dot products, check shapes and compose transformations in order.
Start with arithmetic, percentages and basic algebra. Open any section directly. Practice and completion here do not change any AI course requirement or the original five-lesson mathematics pilot.
1. Try a concrete case
A=[[1,2],[0,1]] times v=[2,−1] gives [0,−1]: row one is 1×2+2×(−1); row two is 0×2+1×(−1).
2. Predict before changing a value
Change only the upper-right entry, then the lower-left. Inspect each product before its sum and compare A applied once with A applied twice. Name the quantity you expect to change and one you expect to stay fixed before using the controls.
3. Experiment
Change one quantity, follow every calculation
- Matrix A
- [[1, 1], [0, 1]]
- Av
- 1.00000, -1.00000
- A(Av)
- 0.00000, -1.00000
- v dot Av
- 3.00000
Vertical axis: Second coordinate. Fixed scales; 0 points clipped for display. Lines join sampled values to aid reading; they do not create extra observations. Exact numerical values are below.
| Row | First product | Second product | Sum |
|---|---|---|---|
| 0 | 2 | -1 | 1 |
| 1 | 0 | -1 | -1 |
A is 2×2 and v is 2×1. Composition preserves multiplication order. A dot product is a sum of paired products, not elementwise multiplication.
Change only the upper-right entry, then the lower-left. Inspect each product before its sum and compare A applied once with A applied twice.
Controls save locally as practice. No timers, remote services or GPU are required. Maximum numerical work is a bounded small table or 256 bootstrap resamples.
4. Understand the calculation
Start with a calculation you can inspect
A=[[1,2],[0,1]] times v=[2,−1] gives [0,−1]: row one is 1×2+2×(−1); row two is 0×2+1×(−1).
Compute dot products, check shapes and compose transformations in order. The experiment changes one named quantity at a time and shows the intermediate values, rather than asking you to accept a final score. Before changing a control, write down which value you expect to move and why.
Read the formula in words and symbols
(Av)i = Σj Aij vj; dot(u,v) = Σj uj vj
Aij is row i, column j. A 2×2 matrix times a 2×1 column produces a 2×1 column. Multiplication combines rows with columns; order matters.
A subscript names a coordinate, case or time index; it is not multiplication. A summation sign means add the terms for the stated indices. Parentheses identify which calculation happens first. Carry units through arithmetic: adding incompatible quantities or confusing a rate with a count changes the question.
Connect the visual and the numbers
Change only the upper-right entry, then the lower-left. Inspect each product before its sum and compare A applied once with A applied twice. The plot uses declared fixed axes, so a new setting does not silently rescale the apparent change. Any clipped values are counted and remain available in the numerical table. Do not infer an exact curve or a new observation from a line drawn between points.
Use it in an AI experiment
These ideas support C02, C03, C04, C05, C08, C11. Use the return link when you entered from an AI lesson; its original section and experiment remain separate. A mathematical support calculation is a way to inspect an assumption, not evidence that a trained model generalizes.
Optional derivation and implementation depth
For compatible shapes, (AB)v=A(Bv); usually AB≠BA. A neural batch may be rows or columns, so document conventions. Broadcasting repeats dimensions according to a framework rule and is not the same as matrix multiplication; manually check a small case.
Recompute the worked example with a separate piece of arithmetic or a short program. State the domain and test a boundary case before using the formula elsewhere. Guided numerical practice, independent implementation and human review are different outcomes.
Shapes before algebra
For (m×n)(n×k), the inner dimensions n must match and the result is m×k. A transpose swaps rows with columns; I is the identity matrix that leaves a compatible vector unchanged. A column v times its transpose vᵀ is an outer-product matrix: for v=[2,−1], vvᵀ=[[4,−2],[−2,1]].
A sensor covariance example uses P=[[4,0],[0,1]] and H=[1,0]. First HP=[4,0], then HPHᵀ=4: a 1×1 measured variance. Reversing the order changes the shapes and generally the result. These shape checks matter before implementing a Kalman update.
Optional implementation and research depth
For compatible shapes, (AB)v=A(Bv); usually AB≠BA. A neural batch may be rows or columns, so document conventions. Broadcasting repeats dimensions according to a framework rule and is not the same as matrix multiplication; manually check a small case.
Recompute one row independently, then test a boundary case and state which assumption it probes. Passing the supplied practice case does not establish independent implementation proficiency.
5. Apply it to a different case
Practice not yet passed; independent mastery and human review are not claimed.
6. Continue when useful
Completion not recorded. Skipping retains settings and practice; it never awards completion.
Used in C02, C03, C04, C05, C08, C11. Browse every support topic and course connection.