Vectors and Linear Combinations

A vector is a list of numbers that behaves like a direction with a length. Adding two of them and scaling one are the only operations linear algebra is built from, and every later object, a constraint, a cost, a basis, is assembled out of those two moves. The dot product turns that geometry into arithmetic: it measures how much of one direction lies along another, which is what lets an optimiser decide where to move without drawing anything.

Definition

A vector x ∈ R n is an ordered list of n real numbers. Two operations define the space: addition ( x + y ) i = x i + y i and scalar multiplication ( λ x ) i = λ x i . A linear combination of v 1 , … , v k is any vector λ 1 v 1 + ⋯ + λ k v k . The dot product is x T y = ∑ i = 1 n x i y i , and the Euclidean norm is ‖ x ‖ = x T x . Two vectors are orthogonal when x T y = 0 .

Formal statement

x + y and λ x entrywise; λ 1 v 1 + ⋯ + λ k v k ; x T y = ∑ i x i y i ; ‖ x ‖ = x T x ; orthogonal when x T y = 0 .

Assumptions and scope

  • Addition requires both vectors to have the same number of entries. Vectors of different dimensions cannot be added, and the operation is undefined rather than zero-padded.

  • The dot product is defined between two vectors of equal dimension and returns a scalar, not a vector. Its result carries the units of the two factors multiplied together.

  • A dot product of zero means orthogonality, not that either vector is zero. Two nonzero vectors can be perpendicular.

  • Scaling by zero yields the zero vector, which is a legitimate member of the space and is a linear combination of any set. The independence definition depends on that fact.

  • The norm is nonnegative and is zero only for the zero vector. It measures length, so a comparison of norms is a comparison of magnitudes and says nothing about direction.

Forms this is expressed in

The same content in several forms. Each makes something visible that the others leave implicit, so moving between them is part of understanding the topic rather than a presentation choice.

geometric

the tip-to-tail path and the right angle are two readings of one pair

A vector read as an arrow rather than a list. Addition becomes placing the second arrow's tail at the first's head; the sum is the arrow from the original tail to the final head.

Scalar multiplication stretches an arrow without turning it, and a negative scalar reverses it along the same line. The translation is mechanical in both directions, which is what later algorithms assume when they speak of moving in a direction.

What the arrow picture does not carry is the arithmetic itself: the dot product is a single number obtained from the lists, and it is the number, not the picture, that decides whether a direction improves an objective. Here it also reports the right angle between the two arrows, which the drawing shows and the arithmetic confirms.

Worked material

Example

Three quantities, three readings

Take x = ( 2 , − 1 , 3 ) and y = ( 4 , 5 , 1 ) in R 3 .

Addition and scaling.

x + y = ( 6 , 4 , 4 ) , 3 x = ( 6 , − 3 , 9 ) .

Each is another vector in R 3 .

A linear combination. With coefficients 2 and − 1 :

2 x − y = ( 4 , − 2 , 6 ) − ( 4 , 5 , 1 ) = ( 0 , − 7 , 5 ) .

The dot product.

x T y = ( 2 ) ( 4 ) + ( − 1 ) ( 5 ) + ( 3 ) ( 1 ) = 8 − 5 + 3 = 6.

One number, not a vector. Its sign says the two vectors broadly agree in direction; had it come out zero they would be perpendicular.

The norm.

‖ x ‖ = 4 + 1 + 9 = 14 ≈ 3.74 .

A length, so it is never negative, and it says nothing about which way x points.

Non-example

Undefined vector operations

Adding vectors of different dimensions. ( 1 , 2 ) + ( 1 , 2 , 3 ) is undefined. The shorter vector is not padded with a zero; the operation simply does not apply.

A dot product that returns a vector. x T y is a single number. Multiplying entry by entry to get ( x 1 y 1 , x 2 y 2 , … ) is a different operation and is not what any later formula means by the notation.

Concluding that a zero dot product means a zero vector. ( 1 , 0 ) T ( 0 , 1 ) = 0 with neither vector zero. Orthogonality is a relationship, not a statement that something vanished.

Reading a larger norm as a better direction. The norm measures length only. Scaling a worsening direction makes it longer and no less worsening.

Treating the zero vector as outside the space. It is a perfectly ordinary member, and it is a linear combination of every set, which is the fact the definition of independence is built on.

Contrast

Two products that are easy to confuse

Dot product x T y Entrywise product
ResultOne scalarA vector
Formula ∑ i x i y i ( x 1 y 1 , … , x n y n )
AnswersHow much of one lies along the otherNothing geometric
Used forCosts, constraint tests, orthogonalityRescaling data entry by entry
Appears in this subjectConstantlyAlmost never

Why the confusion is common. Both are written as a product of two vectors, and a calculator will happily do either. The notation x T y is what distinguishes them: the transpose is doing real work, turning a column into a row so the multiplication collapses to a single number.

The test. Ask what the answer is supposed to be. A cost applied to a plan is money, one number. A constraint applied to a point is a quantity to compare with a bound, one number. If the answer should be a single quantity, it is a dot product.

Where the entrywise product does appear. Rescaling: multiplying each entry of a plan by a per-unit factor. That is a legitimate operation and it is never written x T y .

Common errors

Common misconception

The dot product of two vectors is another vector, obtained by multiplying them entry by entry.

Related units

Connected

Learn this topic

Used in

Sources

Results update as you type. Use the up and down arrow keys to move between results, Enter to open one, and Escape to close.

Type to search.

Settings

Appearance

Interface density

Your record

Your progress is stored in this browser and nowhere else: an identifier, the answers you have given, the mastery states and review schedule derived from them, and the lesson you last opened. Clearing it makes you a new learner on this device. It cannot be undone, and it will not affect your appearance or density settings.

Focus timer

Focus--minutes remaining

Phase

Kept in this browser only, and used to label the session in your own history.

Today

Nothing recorded yet. Finish a focus session and it will appear here.

Settings

Focus sessions between long breaks.

Sessions you are aiming for in a day.

Notifications

Your history

Sessions are stored in this browser and nowhere else. They are not evidence and never reach your mastery record.