Skip to content
FiftyCalc Free calculators for all 50 states

Linear Combination Calculator

Test cases replayed : 2 of 2 match · Methodology · No outside source listed

Enter two vectors and a scalar for each to get c₁u + c₂v. Leave z at 0 for vectors in the plane.

Result

Sample figures

Result: x component—

Result: y component —

  • Result: z component—
  • Length of the result—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Linear Combination of Vectors Calculator

Scalar c₁: enter a number. Prefilled example: 2.

Vector u: x: enter a number. Prefilled example: 1.

Vector u: y: enter a number. Prefilled example: 0.

Vector u: z (0 for 2D): enter a number. Prefilled example: 3.

Scalar c₂: enter a number. Prefilled example: -1.

Vector v: x: enter a number. Prefilled example: 4.

Vector v: y: enter a number. Prefilled example: 2.

Vector v: z (0 for 2D): enter a number. Prefilled example: 1.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Scalar c₁: enter a number.
  2. Vector u: x: enter a number.
  3. Vector u: y: enter a number.
  4. Vector u: z (0 for 2D): enter a number.
  5. Scalar c₂: enter a number.
  6. Vector v: x: enter a number.
  7. Vector v: y: enter a number.
  8. Vector v: z (0 for 2D): enter a number.
  9. Read the result: Result: x component; the panel also shows Result: y component, Result: z component and Length of the result.

How this calculator works

A linear combination multiplies each vector by a scalar and adds the results component by component: c₁u + c₂v = (c₁u_x + c₂v_x, c₁u_y + c₂v_y, c₁u_z + c₂v_z).

The length of the result is √(x² + y² + z²).

The formula

  1. Rx=k1×ux+k2×vx+0
Symbols used in the formula
SymbolMeaning
k1Scalar c₁
uxVector u: x
k2Scalar c₂
vxVector v: x
RxResult: x component

Worked example

Scalar c₁2
Vector u: x1
Vector u: y0
Vector u: z (0 for 2D)3
Scalar c₂-1
Vector v: x4
Vector v: y2
Vector v: z (0 for 2D)1
Result: y component-2
Result: z component5
Length of the result5.7446
  1. Rx=2×1+−1×4+0=−2

Result: x component -2

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

What is 2(1, 0, 3) − (4, 2, 1)?

(2, 0, 6) − (4, 2, 1) = (−2, −2, 5), a vector of length about 5.7446.

What does it mean for a vector to be a linear combination of others?

It can be written as c₁u + c₂v for some numbers c₁ and c₂, so it lies in the plane (or line) the other vectors span.

Related calculators