4.5.2 · D1Linear Algebra (Full)

Foundations — Dot product — formula, cosine formula, Cauchy-Schwarz inequality proof

2,762 words13 min readBack to topic

This page is the "unpack the toolbox" page. The parent note fires symbols at you fast: , , , , , discriminant. Here we meet each before it is ever used, tie it to a picture, and say why the topic can't live without it.


0. What is a vector? (the very first object)

Everything starts here, so we start with nothing but a dot of paper.

The picture. Put your pencil at the origin (the corner point ). Draw an arrow to some spot. That arrow is the vector. The numbers mean "go 3 steps right, then 4 steps up" — the arrow's tip lands there.

Figure — Dot product — formula, cosine formula, Cauchy-Schwarz inequality proof

WHY the topic needs it. The dot product is a machine whose inputs are two vectors. If you don't have a crisp mental image of an arrow-with-tip-coordinates, every later symbol is floating in a vacuum.


1. Components and the subscript notation

Reading the notation.

  • The little number below — the subscript in — is just a label, an address. is the first component, the second. It is not multiplication and not a power.
  • The letter means "however many components there are." In a flat drawing (2D) ; in space (3D) ; abstractly can be anything.

The picture. For : is the horizontal reach, is the vertical reach. Look at figure s01 — the two dashed legs are exactly and .

WHY the topic needs it. The algebraic dot product is — you literally cannot write it without naming components by their address.


2. The symbol — where the arrows live

The picture. is the flat page (2 numbers → a point on paper). is the room you sit in (3 numbers). for bigger you can't draw, but the algebra works identically — that's the point of naming it.

WHY the topic needs it. The parent proves Cauchy–Schwarz without ever drawing a picture, precisely so it survives in where drawing is impossible. Knowing " = space of number-lists" is what lets the proof stay honest.


3. Adding and subtracting vectors (component-wise)

Before any or dot, we need to know how to combine two arrows. This gets used the moment the parent writes and .

The picture. is the "tip-to-tail" walk: lay starting at the tip of ; the combined arrow from the origin to the final tip is the sum. The difference is the arrow that points from the tip of to the tip of (it's the third side of the triangle they form).

Figure — Dot product — formula, cosine formula, Cauchy-Schwarz inequality proof

WHY the topic needs it. The cosine formula is derived on the triangle with sides , , and ; the Cauchy–Schwarz proof studies . Both are just component-wise subtraction — if you can't subtract arrows, neither derivation makes sense.

Recall Subtract two vectors

Compute . :::


4. The summation sign

This is the scariest-looking symbol in the parent, and it means something dead simple.

Reading it slowly.

  • The big Greek (capital sigma, an "S" for "Sum") = "add up."
  • Bottom = start the counter at 1.
  • Top = stop when the counter reaches .

So It is just shorthand for a long "plus" chain — nothing more.

Figure — Dot product — formula, cosine formula, Cauchy-Schwarz inequality proof

WHY the topic needs it. Writing is exhausting. packs the whole pattern into one compact symbol. The dot product's definition is a single .

Recall Unpack this sum yourself

Write out in full. :::


5. The dot operator "" — the machine itself

We keep referring to it, so let us pin down the symbol before it does any work.

Reading the symbol. The same little dot between two plain numbers (like ) means ordinary multiplication. Between two bold vectors it means "the sum above." Same dot, but the type of thing on each side tells you which job it does.

The picture. Slide component next to and multiply; do the same for every axis; drop all those products into one pile and add. One vector in each hand, one number out.

WHY the topic needs it. This is the whole subject. Every symbol so far (components, ) existed so that this one line could be written. When Section 6 writes , it just means "put in both slots of this machine."

Recall Run the machine once

Compute . :::


6. Length / magnitude and the Pythagorean picture

The picture — this is Pythagoras. For , the arrow is the hypotenuse of a right triangle whose legs are the components and . So In general .

Figure — Dot product — formula, cosine formula, Cauchy-Schwarz inequality proof

WHY use the square root, and why this tool? We want a distance, and the Pythagorean theorem is the one rule that turns "sideways reach + upward reach" into "straight-line reach." The square root undoes the squares so we land back in ordinary length units.

The bridge to the dot product. Feed into both slots of the dot machine from Section 5. By its definition, — which is exactly what sits under the square root above. Therefore Length is the dot product looking in a mirror: it is nothing more than the sum under a root. This link is used everywhere later, so lock it in. See Vector projection for how length + direction get separated.


7. The angle and the cosine

The picture. Draw the angle between the two arrows. As you swing one arrow from lined-up toward perpendicular, slides smoothly from down to ; swing further to opposite, it slides to .

Figure — Dot product — formula, cosine formula, Cauchy-Schwarz inequality proof

WHY this tool and not another? We need a single number that is big when aligned, zero when perpendicular, negative when opposed — and that is exactly the behaviour of cosine. No other elementary function matches this "sameness dial" so cleanly. That is why the geometric formula uses and not, say, . (The sibling Cross product uses precisely because it measures the perpendicular part instead.)

The key fact we'll reuse. Because can never leave , we always have . That inequality is the geometric heart of Cauchy–Schwarz. See Law of cosines — that is the exact tool the parent uses to derive the cosine formula.

Recall Check the dial

What is when the two vectors are perpendicular? :::


8. The scalar , "scalar multiple", and being parallel

The picture. is twice as long, same direction. is half as long, pointing the opposite way.

WHY the topic needs it. The Cauchy–Schwarz equality case (" exactly when are parallel") is a statement about scalar multiples. And the whole discriminant proof studies the vector (scalar-multiply by , then subtract component-wise as in Section 3) as varies.


9. The quadratic and its discriminant

The Cauchy–Schwarz proof turns a vector problem into a school-level parabola. You need that parabola.

The picture. For an upward U that never dips below zero, the graph can at most touch the axis — so it has at most one root — so . That single inequality is the whole engine of the algebraic Cauchy–Schwarz proof.

Figure — Dot product — formula, cosine formula, Cauchy-Schwarz inequality proof

WHY this tool? The proof builds , which is a squared length so it can never be negative. "Upward parabola that's never negative" ⟹ discriminant , and rearranging that inequality is Cauchy–Schwarz. The discriminant is the bridge from "geometry says " to "algebra spits out an inequality."


10. The perpendicular symbol and other shorthand

Perpendicularity is the gateway to Orthogonality and orthonormal bases; the whole abstract version lives in Inner product spaces.


How the foundations feed the topic

Vector = arrow

Components a_i

Space R to the n

Add and subtract vectors

Summation sign

Dot operator a dot b

Length Pythagoras

Quadratic in t

Angle theta nonzero

Cosine sameness dial

Cosine formula

Scalar and parallel

Discriminant less or equal 0

Cauchy Schwarz


Equipment checklist

Self-test: cover the right side and answer out loud. If any stalls, reread that section before opening the parent note.

A vector is
an arrow with a length and a direction, written as a list of numbers like
The subscript in means
an address/label (the -th component), NOT a power
is
the space of all lists of real numbers (all -component arrows)
To subtract vectors you
subtract matching components:
The sign tells you to
add up the expression as the counter runs
The dot operator means
multiply matching components and add: (a single number)
means
the length of the arrow, equal to (Pythagoras)
The length in dot-product form is
because
ranges over
to ; it is aligned, perpendicular, opposite
The angle is undefined when
one of the vectors is the zero vector (no direction)
Why cosine (not sine) appears in the dot product
cosine is the "sameness dial": big when aligned, zero when perpendicular
A scalar multiple
stretches or flips the arrow without rotating it; equal-direction line
Two vectors are parallel when
for some scalar
The discriminant of is
; it is when an upward parabola never dips below zero
vs
single bars = absolute value of a number; double bars = length of a vector
means
is perpendicular to (angle , dot product )