mathlinear algebra

vectors

arrows you add and stretch, and the dot product that gives length, angle and projection.

report a mistake
.md

a vector is an arrow, a length and a direction, and it's also two numbers, how far across and how far up. add arrows head to tail, stretch them with a number, and the dot product turns two arrows into one number that says how much they point the same way.

add
(x, y) + (u, v) = (x + u, y + v) head to tail on the grid, part by part on paper
scale
k·(x, y) = (kx, ky) k < 0 flips the arrow
length
|a| = √(x² + y²) pythagoras on the two parts
dot product
xu + yv = |a| |b| cos θ 0 means perpendicular. negative means past 90°
projection
(a · b / |b|²) b a's shadow on b, a · b / |b| long
signed area
xv − yu the parallelogram a and b span. the determinant on the matrices page
|a + b|
≤ |a| + |b| lengths don't add unless the arrows point the same way
the zero vector
(0, 0) length 0 and no direction. normalizing it divides by 0
reach for it
  • a position, a velocity, a force: anything with a size and a direction
  • how much two things point the same way: lighting, similarity, work
  • the columns of a matrix, on the next page
on this page
  1. the idea
  2. explore
  3. try it
  4. the rules
  5. worked examples
  6. the key idea up close
  7. pitfalls
  8. practice

the idea

a vector is an arrow. it has a length and a direction, and that’s all: slide it anywhere on the page and it’s the same vector. a velocity is one, a force is one, the step from one point to another is one. to work with it on paper, write down how far it goes across and how far up: a=(3,1)\mathbf a = (3, 1) goes 3 to the right and 1 up. the two numbers are its components, and the arrow and the pair of numbers are the same thing seen two ways.

everything on this page is one of a few moves on arrows: add two, stretch one by a number, measure one, and multiply two into a single number, the dot product. the first three are in the movie.

−20246−3−2−101234
a=(3,1)\mathbf a = (3, 1): an arrow from the origin, 3 across and 1 up. the two numbers are its components. its length comes from pythagoras on them: ∣a∣=32+12=10≈3.16|\mathbf a| = \sqrt{3^2 + 1^2} = \sqrt{10} \approx 3.16.

an animation on a grid from x = −3.5 to 6.5 and y = −3.5 to 4.5. first a = (3, 1) in cyan grows from the origin, with its two parts drawn under it: 3 across, 1 up, and the readout |a| = √10 ≈ 3.16. then b = (1, 3) in amber appears at the origin and slides to the tip of a, and a + b = (4, 4) is drawn in white from the origin, 4√2 ≈ 5.66 long. third, b from the origin and a copy of a from its tip close a parallelogram with area 3·3 − 1·1 = 8. fourth, a alone is stretched to 2a = (6, 2) and then shrunk through 0 to −a = (−3, −1), along a dotted line through the origin. fifth, −b hangs off the tip of a and lands on a − b = (2, −2), the arrow from the tip of b to the tip of a. last, 2a − b: a stretched to (6, 2), −b from its tip, and the white result (5, −1).

explore

drag the tips. the white arrow is a+b\mathbf a + \mathbf b, and the dashed copy of b\mathbf b hanging off the tip of a\mathbf a is the head-to-tail route to it. the gray bar on the line of b\mathbf b is the shadow of a\mathbf a on b\mathbf b: the part of a\mathbf a that points along b\mathbf b. watch the dot product as the angle passes 90°.

−6−4−20246−6−4−20246a + bθba

drag a tip, or tab to it and use the arrow keys: 0.5 a step, 5 with shift

a
(3, 1), |a| = √10 ≈ 3.16
b
(1, 3), |b| = √10 ≈ 3.16
a + b
(4, 4), |a + b| = √32 ≈ 5.66
a · b, part by part
3·1 + 1·3 = 6
|a| |b| cos θ
3.16 · 3.16 · 0.60 = 6.00
θ, the angle between
53.1°
shadow of a on b
(0.60, 1.80), 1.90 long
signed area
3·3 − 1·1 = 8

a · b is positive: the angle is under 90°, and the shadow of a falls along b, 1.90 long.

a · b / |b| = 1.90: how long the shadow is

a = (3, 1) in cyan and b = (1, 3) in amber from the origin, on a grid from −6 to 6 each way, with a + b = (4, 4) in white, a dashed copy of b from the tip of a, the angle between them marked with an arc, and the shadow of a on b as a gray bar along b's line. drag either tip on a half-unit grid, or tab to it and use the arrow keys, and the readout follows: |a| = |b| = √10 ≈ 3.16 to start, |a + b| = √32 ≈ 5.66, a · b = 3·1 + 1·3 = 6, the same as |a| |b| cos θ = 3.16 · 3.16 · 0.60, θ ≈ 53.1°, the shadow (0.6, 1.8), 1.90 long, and the signed area 3·3 − 1·1 = 8. when the tips are at right angles a · b reads 0 and the shadow is a point; past 90° it goes negative and the shadow falls behind b's tail. a tip on the origin is the zero vector: no direction, no angle.

the shadow is a · b / |b| long. make a and b perpendicular and it shrinks to a point; open them past 90° and it falls behind b's tail.

try it

a = (2, −1) and b = (1, 3). what is a + b?

ba

pick one.

0 / 0 right

a practice exercise with a small grid under each question: the sum of two vectors, a combination like 2a − b, the length of a vector with a whole length like (3, 4), whether a dot product is positive, zero or negative, and which of four vectors is perpendicular to a given one. after an answer the grid draws it: the result in white, the two parts of a length, or the angle between the arrows.

the rules

an arrow, or two numbers

a=(ax,ay)=ax i+ay j\mathbf a = (a_x, a_y) = a_x\,\mathbf i + a_y\,\mathbf j

a vector is written as its components: how far it goes along xx and along yy. i=(1,0)\mathbf i = (1, 0) and j=(0,1)\mathbf j = (0, 1) are the arrows of length 1 along the two axes, so the components are also the amounts of i\mathbf i and j\mathbf j in the vector: (3,1)=3i+j(3, 1) = 3\mathbf i + \mathbf j. a 3d vector has a third component, zz, and everything below works the same with one more term; the cg fundamentals page does the 3d versions, with code. the arrow has no fixed place: (3,1)(3, 1) drawn from the origin and (3,1)(3, 1) drawn from (2,2)(2, 2) are the same vector. a point is also written as two numbers, but it’s a place, not a step; the pitfalls below come back to that.

adding and subtracting

a+b=(ax+bx, ay+by)a−b=(ax−bx, ay−by)\begin{gathered} \mathbf a + \mathbf b = (a_x + b_x,\ a_y + b_y) \\[6pt] \mathbf a - \mathbf b = (a_x - b_x,\ a_y - b_y) \end{gathered}

head to tail: put the tail of b\mathbf b on the tip of a\mathbf a, and a+b\mathbf a + \mathbf b runs from the tail of a\mathbf a to the tip of b\mathbf b. part by part: the xx steps add and the yy steps add, because walking across and walking up are separate walks. the order doesn’t matter, and the two orders close a parallelogram whose diagonal is the sum. a−b\mathbf a - \mathbf b is the arrow from the tip of b\mathbf b to the tip of a\mathbf a: the step that takes you from b\mathbf b to a\mathbf a, so b+(a−b)=a\mathbf b + (\mathbf a - \mathbf b) = \mathbf a. it’s the same as a+(−b)\mathbf a + (-\mathbf b): add the flipped arrow.

scaling

ka=(kax, kay)k\mathbf a = (k a_x,\ k a_y)

a plain number stretches an arrow, which is why numbers are called scalars next to vectors. 2a2\mathbf a is twice as long, 0.5a0.5\mathbf a half as long, −a-\mathbf a the same length the other way, and 0a0\mathbf a is the zero vector. the direction never changes except to flip. two vectors are parallel when one is a multiple of the other, and all the multiples of one arrow lie on one line through the origin.

length

∣a∣=ax2+ay2|\mathbf a| = \sqrt{a_x^2 + a_y^2}

the components are the two legs of a right triangle and the arrow is its hypotenuse, so pythagoras gives the length: ∣(3,4)∣=5|(3, 4)| = 5 and ∣(3,1)∣=10≈3.16|(3, 1)| = \sqrt{10} \approx 3.16. scaling scales it, ∣ka∣=∣k∣ ∣a∣|k\mathbf a| = |k|\,|\mathbf a|. the zero vector has length 0 and no direction: it’s the one arrow that doesn’t point. in code the length is Math.hypot(x, y), which gives exactly 5 for Math.hypot(3, 4).

unit vectors

a^=a∣a∣\hat{\mathbf a} = \frac{\mathbf a}{|\mathbf a|}

divide an arrow by its own length and it’s 1 long, the same way: a direction with the size taken out. (3,4)/5=(0.6,0.8)(3, 4) / 5 = (0.6, 0.8), and 0.62+0.82=10.6^2 + 0.8^2 = 1. a unit vector times a length is an arrow of that length in that direction, which is how a speed and a heading become a velocity. the zero vector can’t be normalized: 0/00 / 0.

linear combinations and span

sa+tbs\mathbf a + t\mathbf b

stretch each arrow by its own number and add: a linear combination. everything you can reach that way is the span. one arrow spans a line. two arrows that aren’t parallel span the whole plane: for any target there is exactly one pair s,ts, t that lands on it, and finding the pair is solving two equations in two unknowns, the linear systems page. two parallel arrows span only a line: the second adds no new direction. i\mathbf i and j\mathbf j are the simplest pair, and with them the coefficients are the coordinates, (x,y)=xi+yj(x, y) = x\mathbf i + y\mathbf j. any other pair that isn’t parallel works as a basis too, with different numbers for the same point.

−6−4−20246−4−2024uvs·utarget

u and v aren't parallel, so some s and t reach every point of the plane. move the sliders until the white tip lands on the target (1, 2).

two arrows from the origin on a grid from −6.5 to 6.5 across and −4.5 to 4.5 up, u = (2, 1) in cyan and v = (−1, 1) in amber to start, two sliders s and t from −2 to 2 in half steps, s·u dashed in cyan, t·v dashed in amber from its tip, their sum s·u + t·v in white, and a hollow target at (1, 2). it opens at s = 1, t = 0, on u itself; s = 1 and t = 1 land on the target: 1·(2, 1) + 1·(−1, 1) = (1, 2). a row of buttons swaps the pair: i = (1, 0) and j = (0, 1), where s = 1 and t = 2 reach it and the two numbers are the coordinates, or u with w = (−1, −0.5), parallel to it, where every combination stays on a dotted line through the origin and the target is out of reach.

with i and j the sliders are the coordinates. with u and v the same point needs different numbers. with a parallel pair, most points are out of reach.

the dot product

a⋅b=axbx+ayby=∣a∣ ∣b∣cos⁡θ\mathbf a \cdot \mathbf b = a_x b_x + a_y b_y = |\mathbf a|\,|\mathbf b|\cos\theta

two vectors in, one number out. on paper: multiply matching parts and add. in the picture: the two lengths times the cosine of the angle between them. the two forms agree, which the key idea below shows, and each has its job: the first is what you compute, the second is what it means. cos⁡θ\cos\theta is 1 when the arrows point the same way, 0 at a right angle and −1-1 when they’re opposite, so the sign of a⋅b\mathbf a \cdot \mathbf b says which side of 90° the angle is on, with no trig at all. a⋅a=∣a∣2\mathbf a \cdot \mathbf a = |\mathbf a|^2, so the dot product holds the length too. it’s symmetric, a⋅b=b⋅a\mathbf a \cdot \mathbf b = \mathbf b \cdot \mathbf a, and it spreads over sums, a⋅(b+c)=a⋅b+a⋅c\mathbf a \cdot (\mathbf b + \mathbf c) = \mathbf a \cdot \mathbf b + \mathbf a \cdot \mathbf c, both of which you can read off the component form.

perpendicular

a⋅b=0  ⟺  a⊥b\mathbf a \cdot \mathbf b = 0 \iff \mathbf a \perp \mathbf b

a dot product of 0 means cos⁡θ=0\cos\theta = 0, a right angle, unless one of the arrows is the zero vector. in 2d a perpendicular is one move away: swap the components and flip one sign. (−ay,ax)(-a_y, a_x) is a\mathbf a turned a quarter turn counter-clockwise, and ax(−ay)+ayax=0a_x(-a_y) + a_y a_x = 0. for (2,3)(2, 3) that’s (−3,2)(-3, 2).

projection

proj⁡ba=a⋅bb⋅b bits length: a⋅b∣b∣=∣a∣cos⁡θ\begin{gathered} \operatorname{proj}_{\mathbf b}\mathbf a = \frac{\mathbf a \cdot \mathbf b}{\mathbf b \cdot \mathbf b}\,\mathbf b \\[6pt] \text{its length: } \frac{\mathbf a \cdot \mathbf b}{|\mathbf b|} = |\mathbf a|\cos\theta \end{gathered}

drop a perpendicular from the tip of a\mathbf a onto the line of b\mathbf b. where it lands is the shadow of a\mathbf a on b\mathbf b: the part of a\mathbf a that points along b\mathbf b. its length is ∣a∣cos⁡θ|\mathbf a|\cos\theta, the side next to θ\theta in a right triangle whose hypotenuse is ∣a∣|\mathbf a|, and by the second form of the dot product that’s a⋅b/∣b∣\mathbf a \cdot \mathbf b / |\mathbf b|. multiply the unit vector of b\mathbf b by that length and you have the shadow as a vector, which is the first line. the sign comes along: a negative length means the shadow falls behind the tail of b\mathbf b. what’s left over, a−proj⁡ba\mathbf a - \operatorname{proj}_{\mathbf b}\mathbf a, is perpendicular to b\mathbf b, so every vector splits into a part along b\mathbf b and a part across it. for the page’s pair, the shadow of a\mathbf a on b\mathbf b is (6/10)(1,3)=(0.6,1.8)(6 / 10)(1, 3) = (0.6, 1.8), 6/10≈1.906 / \sqrt{10} \approx 1.90 long, and the rest is (2.4,−0.8)(2.4, -0.8), which dots with (1,3)(1, 3) to 0.

the angle

cos⁡θ=a⋅b∣a∣ ∣b∣\cos\theta = \frac{\mathbf a \cdot \mathbf b}{|\mathbf a|\,|\mathbf b|}

solve the second form for the cosine, then take arccos⁡\arccos. for a=(3,1)\mathbf a = (3, 1) and b=(1,3)\mathbf b = (1, 3): 6/(1010)=0.66 / (\sqrt{10}\sqrt{10}) = 0.6, so θ=arccos⁡0.6≈53.13°\theta = \arccos 0.6 \approx 53.13°. two unit vectors skip the division: their dot product is the cosine itself. on a computer, rounding can push the ratio a hair past 1, where arccos⁡\arccos has no answer; the cg fundamentals page shows the case and the fix, an atan2⁡\operatorname{atan2} form, which is what the explore figure uses. for the direction of one vector as an angle from the xx axis, it’s atan2⁡(y,x)\operatorname{atan2}(y, x), on the trig page.

signed area

axby−aybx=∣a∣ ∣b∣sin⁡θa_x b_y - a_y b_x = |\mathbf a|\,|\mathbf b|\sin\theta

the parallelogram with sides a\mathbf a and b\mathbf b has base ∣a∣|\mathbf a| and height ∣b∣sin⁡θ|\mathbf b|\sin\theta. the cross-multiplied components give the same area with a sign: positive when b\mathbf b is counter-clockwise from a\mathbf a, negative when it’s clockwise, 0 when they’re parallel. for the page’s pair, 3⋅3−1⋅1=83 \cdot 3 - 1 \cdot 1 = 8. the sign is how a game tells whether a point is left or right of a line. in 3d the same arithmetic, done three times, is the cross product, a vector perpendicular to both; the cg fundamentals page covers it. on the matrices page this number is the determinant of the matrix with a\mathbf a and b\mathbf b as its columns.

worked examples

a step between points. p=(2,−1)p = (2, -1) and q=(4,3)q = (4, 3). the step from pp to qq is q−p=(4−2, 3−(−1))=(2,4)q - p = (4 - 2,\ 3 - (-1)) = (2, 4), and its length is the distance between them: 4+16=20≈4.47\sqrt{4 + 16} = \sqrt{20} \approx 4.47. p+q=(6,2)p + q = (6, 2) is a legal sum of numbers but not a meaningful place.

a unit vector. v=(−3,4)\mathbf v = (-3, 4). ∣v∣=9+16=5|\mathbf v| = \sqrt{9 + 16} = 5, so v/∣v∣=(−0.6,0.8)\mathbf v / |\mathbf v| = (-0.6, 0.8). check: 0.36+0.64=10.36 + 0.64 = 1. a speed of 10 in that direction is the velocity 10⋅(−0.6,0.8)=(−6,8)10 \cdot (-0.6, 0.8) = (-6, 8).

the angle between two arrows. u=(4,2)\mathbf u = (4, 2) and w=(1,3)\mathbf w = (1, 3). u⋅w=4+6=10\mathbf u \cdot \mathbf w = 4 + 6 = 10. ∣u∣=20≈4.47|\mathbf u| = \sqrt{20} \approx 4.47 and ∣w∣=10≈3.16|\mathbf w| = \sqrt{10} \approx 3.16, and their product is 200=102≈14.14\sqrt{200} = 10\sqrt 2 \approx 14.14. so cos⁡θ=10/(102)=1/2\cos\theta = 10 / (10\sqrt 2) = 1 / \sqrt 2, and θ=45°\theta = 45° exactly.

a projection. a force f=(3,4)\mathbf f = (3, 4) pulls on a block on a ramp that runs along d=(2,1)\mathbf d = (2, 1). how much of the force pulls along the ramp? f⋅d/∣d∣=(6+4)/5=10/5=25≈4.47\mathbf f \cdot \mathbf d / |\mathbf d| = (6 + 4) / \sqrt 5 = 10 / \sqrt 5 = 2\sqrt 5 \approx 4.47. as a vector: (f⋅d/d⋅d) d=(10/5)(2,1)=(4,2)(\mathbf f \cdot \mathbf d / \mathbf d \cdot \mathbf d)\,\mathbf d = (10 / 5)(2, 1) = (4, 2). the rest, f−(4,2)=(−1,2)\mathbf f - (4, 2) = (-1, 2), presses into the ramp: it’s perpendicular to d\mathbf d, since (−1)⋅2+2⋅1=0(-1) \cdot 2 + 2 \cdot 1 = 0.

which side. a=(4,1)\mathbf a = (4, 1) and b=(−2,3)\mathbf b = (-2, 3). a⋅b=−8+3=−5\mathbf a \cdot \mathbf b = -8 + 3 = -5: negative, so the angle is past 90° (it’s about 109.65°109.65°). axby−aybx=12+2=14a_x b_y - a_y b_x = 12 + 2 = 14: positive, so b\mathbf b is counter-clockwise from a\mathbf a, and the parallelogram they span has area 14.

reaching a point. write (5,1)(5, 1) as s(2,1)+t(1,−1)s(2, 1) + t(1, -1). part by part: 2s+t=52s + t = 5 and s−t=1s - t = 1. add the two equations: 3s=63s = 6, so s=2s = 2 and t=1t = 1. check: 2(2,1)+(1,−1)=(4,2)+(1,−1)=(5,1)2(2, 1) + (1, -1) = (4, 2) + (1, -1) = (5, 1). two equations, two unknowns: the linear systems page does this in general.

the key idea up close

why the two dot products agree

the two forms of the dot product look unrelated: one is arithmetic on components, the other is two lengths and an angle. the law of cosines ties them together.

−1012340123aba − bθ|a| = √10|b| = √10|a − b| = √8

a triangle: a = (3, 1) in cyan and b = (1, 3) in amber from the origin, the angle θ between them marked at the origin, and a − b = (2, −2) in white from the tip of b to the tip of a as the third side. the sides are labeled |a| = √10, |b| = √10 and |a − b| = √8: about 3.16, 3.16 and 2.83.

a, b and a − b make a triangle, with θ between a and b. the law of cosines knows the third side from the other two and that angle.

put a\mathbf a and b\mathbf b tail to tail. the third side of the triangle is a−b\mathbf a - \mathbf b, and the angle between a\mathbf a and b\mathbf b is θ\theta. the law of cosines, pythagoras with a correction for the angle, says

∣a−b∣2=∣a∣2+∣b∣2−2 ∣a∣ ∣b∣cos⁡θ\begin{aligned} |\mathbf a - \mathbf b|^2 &= |\mathbf a|^2 + |\mathbf b|^2 \\ &\quad - 2\,|\mathbf a|\,|\mathbf b|\cos\theta \end{aligned}

now take the left side apart with components. write a⋅b\mathbf a \cdot \mathbf b for axbx+aybya_x b_x + a_y b_y, the component form, and use two facts about it that are plain arithmetic: a⋅a=ax2+ay2=∣a∣2\mathbf a \cdot \mathbf a = a_x^2 + a_y^2 = |\mathbf a|^2, and it spreads over sums and differences the way multiplication does. then

∣a−b∣2=(a−b)⋅(a−b)=a⋅a−2 a⋅b+b⋅b=∣a∣2−2 a⋅b+∣b∣2\begin{aligned} |\mathbf a - \mathbf b|^2 &= (\mathbf a - \mathbf b) \cdot (\mathbf a - \mathbf b) \\ &= \mathbf a \cdot \mathbf a - 2\,\mathbf a \cdot \mathbf b + \mathbf b \cdot \mathbf b \\ &= |\mathbf a|^2 - 2\,\mathbf a \cdot \mathbf b + |\mathbf b|^2 \end{aligned}

both say what the squared third side is. set them equal, cancel ∣a∣2+∣b∣2|\mathbf a|^2 + |\mathbf b|^2 from both sides and divide by −2-2:

a⋅b=∣a∣ ∣b∣cos⁡θ\mathbf a \cdot \mathbf b = |\mathbf a|\,|\mathbf b|\cos\theta

with the page’s pair: ∣a−b∣2=∣(2,−2)∣2=8|\mathbf a - \mathbf b|^2 = |(2, -2)|^2 = 8, and ∣a∣2+∣b∣2−2 a⋅b=10+10−12=8|\mathbf a|^2 + |\mathbf b|^2 - 2\,\mathbf a \cdot \mathbf b = 10 + 10 - 12 = 8. the same argument runs in 3d with one more component, which is why a shader can take the cosine of the angle between a normal and a light without ever finding the angle.

pitfalls

practice

  1. a=(−2,5)\mathbf a = (-2, 5) and b=(4,−1)\mathbf b = (4, -1). find a+b\mathbf a + \mathbf b, a−b\mathbf a - \mathbf b, 3a3\mathbf a and ∣b∣|\mathbf b|.

    answer

    part by part: a+b=(2,4)\mathbf a + \mathbf b = (2, 4), a−b=(−6,6)\mathbf a - \mathbf b = (-6, 6), 3a=(−6,15)3\mathbf a = (-6, 15). ∣b∣=16+1=17≈4.12|\mathbf b| = \sqrt{16 + 1} = \sqrt{17} \approx 4.12.

  2. find the unit vector in the direction of (5,−12)(5, -12).

    answer

    ∣(5,−12)∣=25+144=169=13|(5, -12)| = \sqrt{25 + 144} = \sqrt{169} = 13, so the unit vector is (5/13, −12/13)≈(0.385,−0.923)(5 / 13,\ -12 / 13) \approx (0.385, -0.923). check: 25/169+144/169=125 / 169 + 144 / 169 = 1.

  3. p=(3,4)\mathbf p = (3, 4). show that q=(4,−3)\mathbf q = (4, -3) is perpendicular to it, and find the angle between p\mathbf p and r=(7,1)\mathbf r = (7, 1).

    answer

    p⋅q=12−12=0\mathbf p \cdot \mathbf q = 12 - 12 = 0, so they’re perpendicular: q\mathbf q is p\mathbf p with the parts swapped and one sign flipped. p⋅r=21+4=25\mathbf p \cdot \mathbf r = 21 + 4 = 25, ∣p∣=5|\mathbf p| = 5 and ∣r∣=50≈7.07|\mathbf r| = \sqrt{50} \approx 7.07, so cos⁡θ=25/(550)=5/50=1/2\cos\theta = 25 / (5\sqrt{50}) = 5 / \sqrt{50} = 1 / \sqrt 2 and θ=45°\theta = 45°.

  4. find the shadow of (6,2)(6, 2) on (1,1)(1, 1), and the part of (6,2)(6, 2) that’s perpendicular to (1,1)(1, 1).

    answer

    (6,2)⋅(1,1)=8(6, 2) \cdot (1, 1) = 8 and (1,1)⋅(1,1)=2(1, 1) \cdot (1, 1) = 2, so the shadow is (8/2)(1,1)=(4,4)(8 / 2)(1, 1) = (4, 4), which is 8/2=42≈5.668 / \sqrt 2 = 4\sqrt 2 \approx 5.66 long. the rest is (6,2)−(4,4)=(2,−2)(6, 2) - (4, 4) = (2, -2), and (2,−2)⋅(1,1)=0(2, -2) \cdot (1, 1) = 0, so it’s perpendicular. the two parts add back to (6,2)(6, 2).

  5. find ss and tt with s(1,2)+t(3,1)=(7,9)s(1, 2) + t(3, 1) = (7, 9). what’s the signed area of the parallelogram (1,2)(1, 2) and (3,1)(3, 1) span, and what does it have to do with the answer?

    answer

    part by part: s+3t=7s + 3t = 7 and 2s+t=92s + t = 9. the second gives t=9−2st = 9 - 2s; in the first, s+27−6s=7s + 27 - 6s = 7, so s=4s = 4 and t=1t = 1. check: (4,8)+(3,1)=(7,9)(4, 8) + (3, 1) = (7, 9). the signed area is 1⋅1−2⋅3=−51 \cdot 1 - 2 \cdot 3 = -5: negative, so (3,1)(3, 1) is clockwise from (1,2)(1, 2). it’s not 0, so the two aren’t parallel, and that’s why exactly one pair s,ts, t reaches (7,9)(7, 9), or any other point.

  6. when does ∣a+b∣|\mathbf a + \mathbf b| equal ∣a∣+∣b∣|\mathbf a| + |\mathbf b|? try a=(2,1)\mathbf a = (2, 1) with b=(4,2)\mathbf b = (4, 2), then with b=(−1,2)\mathbf b = (-1, 2).

    answer

    only when the arrows point the same way, so the head-to-tail route doesn’t bend. (4,2)=2a(4, 2) = 2\mathbf a does: ∣a∣=5≈2.24|\mathbf a| = \sqrt 5 \approx 2.24, ∣b∣=20≈4.47|\mathbf b| = \sqrt{20} \approx 4.47, and a+b=(6,3)\mathbf a + \mathbf b = (6, 3) has length 45≈6.71\sqrt{45} \approx 6.71, the sum. (−1,2)(-1, 2) doesn’t: ∣b∣=5≈2.24|\mathbf b| = \sqrt 5 \approx 2.24 too, so ∣a∣+∣b∣≈4.47|\mathbf a| + |\mathbf b| \approx 4.47, but a+b=(1,3)\mathbf a + \mathbf b = (1, 3) is only 10≈3.16\sqrt{10} \approx 3.16 long. in fact a⋅b=−2+2=0\mathbf a \cdot \mathbf b = -2 + 2 = 0: these two are perpendicular, and the sum is the hypotenuse.