Skip to content
Glacius
Linear algebraConcept reference

Linear combinations

A linear combination is a sum of scalar multiples of equal-dimension vectors.

On this page 7 sections
  1. Overview
  2. A linear combination builds a vector by scaling supplied vectors and adding the results
  3. Weights can be positive, negative, or zero
  4. For u=(1,1) and v=(1,-1), join 2u and v head to tail
  5. Key takeaway
  6. Sources & further reading
  7. Concept connections

01A linear combination builds a vector by scaling supplied vectors and adding the results#

A linear combination builds a vector by scaling supplied vectors and adding the results. In au+bvau+bv, the numbers aa and bb are the weights; each weight multiplies every coordinate of its vector.

With u=(1,2)u=(1,2) and v=(3,1)v=(3,-1), find 2uv2u-v. Scaling gives (2,4)(2,4) and (3,1)(-3,1). Their first coordinates sum to −1; their second coordinates sum to 5.

2uv=(1,5)2u-v=(-1,5)
Check your reasoning

For u=(2,1)u=(2,1) and v=(1,2)v=(1,-2), find u+2vu+2v.

  1. A(3,1)(3,-1)
  2. B(4,3)(4,-3)
  3. C(6,2)(6,-2)
Show answer and explanation
(4,3)(4,-3)

Double vv to (2,4)(2,-4), then add uu: (4,3)(4,-3).

02Weights can be positive, negative, or zero#

Weights can be positive, negative, or zero. A zero weight contributes a zero vector. The weights do not have to add to one. With more vectors, scale each by its own weight and add all the contributions.

Check your reasoning

For u=(4,2)u=(4,2) and v=(3,1)v=(3,-1), find 0u2v0u-2v.

  1. A(6,2)(-6,2)
  2. B(6,2)(6,-2)
  3. C(2,4)(-2,4)
Show answer and explanation
(6,2)(-6,2)

Zero removes uu. Scale both entries of vv by −2.

03For u=(1,1) and v=(1,-1), join 2u and v head to tail#

For u=(1,1)u=(1,1) and v=(1,1)v=(1,-1), join 2u2u and vv head to tail. The total is (3,1)(3,1).

Equal-scale axes use 40 pixels per unit in both directions. With u=(1,1) and v=(1,-1), the arrow 2u goes from (0,0) to (2,2). A translated copy of v continues to (3,1). The resultant 2u+v goes from (0,0) to (3,1). The weights 2 and 1 sum to 3.Equal-scale axes use 40 pixels per unit in both directions. With u=(1,1) and v=(1,-1), the arrow 2u goes from (0,0) to (2,2). A translated copy of v continues to (3,1). The resultant 2u+v goes from (0,0) to (3,1). The weights 2 and 1 sum to 3.
Figure 1Equal-scale axes use 40 pixels per unit in both directions. With u=(1,1) and v=(1,-1), the arrow 2u goes from (0,0) to (2,2). A translated copy of v continues to (3,1). The resultant 2u+v goes from (0,0) to (3,1). The weights 2 and 1 sum to 3.
Link to this figure ↗Download SVGDownload PNG
Check your reasoning

A state gets update (1,3)(1,3) twice, then reverses update (4,1)(4,1). Total change?

  1. A(6,7)(6,7)
  2. B(6,4)(-6,4)
  3. C(2,5)(-2,5)
Show answer and explanation
(2,5)(-2,5)

Combine (2,6)(2,6) with (4,1)(-4,-1) to get (2,5)(-2,5).

Key takeaway

Scale each whole vector by its weight, then add matching coordinates.

  • Construct a weighted sum of supplied vectors.

Sources & further reading

  1. [1]

Reference this concept

Link to this page, a section, or an individual figure.

Glacius. “Linear combinations.” Math behind ML. /learn/la-combination