II.2 · Linear Algebra
What does a negative scale do?
Change one scalar and watch both components respond. Length follows its absolute value; direction follows its sign, until zero removes direction entirely.
Scale a move; inspect its sign
The length is multiplied by |k|. The direction is reversed because k is negative.
- original vector
- (3, 2)
- scalar
- −1.5
- scaled vector
- (−4.5, −3)
- original length
- √133.605551…
- scaled length
- 3√13/25.408327…
- relative direction
- reversed
Exact expressions use =. Rounded computations use ≈. All arrows use these same quantities.
The length is multiplied by |k|. The direction is reversed because k is negative.
from −4 to 4, up to 2 decimal places
from −4 to 4, up to 2 decimal places
from −2 to 2, up to 2 decimal places
Try , , and before reading. Predict whether the result is longer, shorter, or reversed when . The original arrow stays available for comparison. The plane fits both arrows at one common scale, so compare their lengths within the current picture rather than across two differently fitted pictures.
Intuition: repeat or reverse a move
The vector says “three right, two up.” Twice that move is . Half that move is . Scaling changes how much of the instruction you execute. A negative scalar first reverses the instruction and then changes its amount: .
The scalar is one number. It acts on both components together. If you stretch only the horizontal component, the direction generally changes; that is a different operation. Uniform scalar multiplication keeps a nonzero vector on the same line through the origin.
Definition
For and ,
If and , points the same way. If , it points the opposite way. If or , the result is the zero vector. Its direction is undefined, regardless of the other input.
Mechanics: sign and amount are separate
The scalar control accepts decimals between and with at most two decimal places. This range is an exploration window, not a restriction on the mathematical definition. Values outside it are rejected with a message. Arrow keys on the original vector move its components; arrow keys in the scalar field step . Both input paths update the same lesson state.
Watch the inspector’s two lengths. A negative can make the result longer, but it cannot make the length negative. At zero, the length remains a defined number while the direction row explicitly becomes undefined. Making produces that same exception even if is positive.
Derivation: the norm uses an absolute value
Apply the Euclidean length formula from I.3 Vectors:
The last step uses , which holds for every real . Writing instead would fail whenever is negative. Squared length scales by ; length scales by .
The component definition also gives three useful laws:
For example, the first horizontal component is . The vertical component follows the same real-number distributive law. Scaling a combined move therefore agrees with scaling the two moves first and then adding them.
Worked examples
Take and . The output is . The original length is and the new length is . Both component signs reverse, while the length factor is positive.
Inspect the worked calculation
Multiply both components of v = (3, 2) by −1.5.
- original vector
- (3, 2)
- scalar
- −1.5
- scaled vector
- (−4.5, −3)
- original length
- √133.605551…
- scaled length
- 3√13/25.408327…
- relative direction
- reversed
A different problem asks which scalar maps to . The horizontal ratio is and the vertical ratio is . Because both ratios agree, the target is a scalar multiple. A target such as gives inconsistent ratios and cannot be reached by scaling this vector alone.
Executable reference code
The Fraction implementation makes decimal scaling exact. Its demonstration checks both components and the norm law. NumPy expresses the practical array operation directly. In each case, a zero output must be checked before any later direction computation.
from fractions import Fraction
from math import hypot, isclose
def scale(k, v):
if len(v) != 2:
raise ValueError('Expected two components')
k = Fraction(str(k))
return tuple(k * Fraction(str(x)) for x in v)
if __name__ == '__main__':
result = scale('-1.5', (3, 2))
assert result == (Fraction('-4.5'), -3)
assert isclose(hypot(*result), 1.5 * hypot(3, 2), rel_tol=2e-15)
assert scale(0, (3, 2)) == (0, 0) # no direction at zeroimport numpy as np
v = np.array([3.0, 2.0])
k = -1.5
scaled = k * v
assert np.array_equal(scaled, [-4.5, -3])
assert np.isclose(np.hypot(*scaled), abs(k) * np.hypot(*v))
# k = 0 yields zero; do not attach a direction to that result.Explore
Set and predict the length for . Compare each pair with the same absolute value. Then make one component of zero: the direction rule still works on an axis. Finally set both components to zero and explain why changing cannot restore a direction.
Try to reach by scaling . The ratios do not agree. This failed construction is a preview of span: one vector supplies one line of possible moves, while a second independent vector supplies another direction.
Common mistakes
Multiplying only one component is an axis stretch. Adding to both components is a translation in component space. Neither implements . Also distinguish “opposite” from “perpendicular”: multiplying by changes the direction by a half-turn, not a quarter-turn. A negative length is never the explanation of a reversed arrow.
Numerical considerations
The stage uses exact decimal rationals for multiplication and an exact radical when expressing the norm. Rendered screen coordinates and rounded norm readouts are numerical views of those values. In ordinary floating point, a very large product can overflow and a very small product can underflow to zero. Once an output has underflowed to zero, an algorithm must not claim its stored components still specify a unit direction. The conceptual norm law remains true over real numbers even when its direct numerical implementation loses information. Exact entered decimals also differ from exact representations of a binary64 measurement; choose the input interpretation deliberately.
Engineering and ML connections
A gain multiplies a signal; a time interval scales a velocity into a displacement. Units must be tracked: seconds times metres per second produce metres. In parameter updates, a learning rate scales a direction before addition. Negative scaling reverses an update, so signs in an optimization formula determine whether the move follows or opposes a gradient. Later chapters will derive those directions rather than assume them.
Exercises
Summary and checkpoints
One scalar multiplies every component. Its absolute value controls length, and its sign controls the direction of a nonzero result. Verify that you can derive the norm law, diagnose inconsistent component ratios, and handle the zero exception. II.3 Norms and normalization uses a positive scalar chosen from the vector’s own length to create a unit direction.