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
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.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Scalar c₁: enter a number.
- Vector u: x: enter a number.
- Vector u: y: enter a number.
- Vector u: z (0 for 2D): enter a number.
- Scalar c₂: enter a number.
- Vector v: x: enter a number.
- Vector v: y: enter a number.
- Vector v: z (0 for 2D): enter a number.
- 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
| Symbol | Meaning |
|---|---|
| Scalar c₁ | |
| Vector u: x | |
| Scalar c₂ | |
| Vector v: x | |
| Result: x component |
Worked example
| Scalar c₁ | 2 |
|---|---|
| Vector u: x | 1 |
| Vector u: y | 0 |
| Vector u: z (0 for 2D) | 3 |
| Scalar c₂ | -1 |
| Vector v: x | 4 |
| Vector v: y | 2 |
| Vector v: z (0 for 2D) | 1 |
| Result: y component | -2 |
|---|---|
| Result: z component | 5 |
| Length of the result | 5.7446 |
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.