✳ BETWEEN QUESTIONS ML STUDY ATLAS

A QUESTION-LED LESSON

Vectors and Matrices: A Compact Language for Models

A vector groups values that belong together. A matrix describes many linear combinations at once.

One example, one dot product

For features x = [2, 3] and weights w = [0.5, −1], the score is w · x + b = 0.5 × 2 − 1 × 3 + b. The dot product combines corresponding entries; the order and units of features must match the weights.

A layer as a matrix

If W has shape (outputs, inputs) and x has shape (inputs,), then Wx + b gives one value per output. Each row of W is a different set of weights. A batch can be represented differently depending on convention, so check the shapes rather than memorizing a single layout. Try changing just one input at a time. Each bar is that input multiplied by its fixed weight, and adding the contributions produces the dot product.

INTERACTIVE EXPLORATION

Watch a dot product change

Change one component of the input vector. The two bars are the contributions from each feature to w · x.

A geometric view

In two dimensions, a vector can be drawn as an arrow. Linear transformations move and reshape space while preserving addition and scaling. The same algebra applies in higher dimensions even when the geometry is harder to draw.

Check your understanding

If W has 3 rows and 2 columns and x has 2 entries, how many outputs does Wx have?

Three: one output for each row of W.

Keep exploring

Linear classification ↗Neural networks ↗

Further reading

Source and further reading ↗