Solutions
These solutions collect the exercise reasoning in one place.
MATH-C02-C-001
In:
the second coordinate is 6.
MATH-C02-C-002
Add matching coordinates:
The first coordinate is 7.
MATH-C02-C-003
Scale each coordinate:
The first coordinate is 12.
MATH-C02-C-004
Multiply matching entries, then add:
MATH-C02-C-005
First compute the difference:
Then compute its length:
MATH-C02-C-006
The dot product is:
Both vectors have length 1, so the cosine similarity is:
MATH-C02-C-007
Projection onto keeps the horizontal component:
MATH-C02-C-008
The dot product returns a scalar.
It multiplies matching entries, then adds the products into one number. That is why it can act as a score.
MATH-C02-C-009
The safer statement is:
Embeddings are learned coordinates whose directions and relationships can be useful.
An embedding can be useful without every coordinate having a simple human label.
MATH-C02-C-010
Cosine similarity compares direction after accounting for length:
That is why it is often used to compare embedding directions.
MATH-C02-C-011
Enter 1.
Both vectors have shape two, but the coordinate meanings do not match:
[rooms, distance_km]
[age_years, height_cm]
Adding them would mix unrelated quantities. Shape is necessary for vector addition, but meaningful addition also needs matching coordinate roles.
MATH-C02-C-012
Subtract the projected vector from the original vector:
The projection keeps the part along . The residual is the part left over.