Audited 05 Aug 2026·Last updated 28 Oct 2026·3 citations·Tier 2·0 uses

Linear Combination Calculator

Scale two 2D vectors and add them: enter scalars α and β and the x and y components of v and w to get αv + βw and the length of the result.

Linear Combination Calculator

Result x component
-2
The x-component of αv + βw: α times v's x-component plus β times w's x-component.
Result y component
4
Result magnitude
4.4721

Background.

Scaling and adding is linear algebra in miniature. Take a vector, stretch or shrink it by a number, do the same to a second vector, and add the two: the result is a linear combination, written αv + βw. The resultant of two forces in a mechanics problem, a blend of two ingredients described by their nutrient content and a point partway between two positions in a drawing program are all built this way.

In two dimensions the work happens one axis at a time. The x-component of the result is α times v's x plus β times w's x, and the y-component is built the same way from the y-values. A negative scalar turns a vector round before it is added, which is how subtraction fits in: v − w is just the combination with α = 1 and β = −1. A scalar of zero drops a vector out altogether.

The interesting questions are about what the combinations can reach. If v and w point in genuinely different directions, suitable choices of α and β land on any point of the plane: the two vectors span it and could serve as a coordinate system of their own. If one is a multiple of the other, every combination stays on a single line through the origin. A quick test is the determinant vₓ·w_y − v_y·w_x, which is zero exactly when the vectors are parallel.

Some choices of scalars have names of their own. When α and β add up to 1, the result lies on the line through the tips of v and w, and α = β = 0.5 gives the midpoint. When both are also non-negative, the result lies on the segment between them, a weighted average of two positions.

The page also reports the result's length, which has to be worked out afresh from the new components.

What is linear combination calculator?

A linear combination of two vectors v and w is any vector of the form αv + βw, where α and β are ordinary numbers called scalars. In the plane, with v = (vₓ, v_y) and w = (wₓ, w_y), the combination is the vector (αvₓ + βwₓ, αv_y + βw_y). Its magnitude is the length of that arrow, √(x² + y²). The set of every possible combination of v and w is their span: the whole plane when the two are not parallel, and a single line through the origin when they are.

How to use this calculator.

  1. Enter the first scalar α and the x and y components of the first vector v.
  2. Enter the second scalar β and the components of w. Use a negative scalar to subtract a vector and 0 to leave it out.
  3. Keep both vectors in the same units and the same axes; combining a force in newtons with one in kilonewtons gives a number that describes nothing.
  4. Read the x and y components of the result, then its magnitude, which is in the same units as the components.

The formula.

result = alpha*v + beta*w, component by component

The result r = αv + βw is built separately on each axis: rₓ = α·vₓ + β·wₓ and r_y = α·v_y + β·w_y. Multiplying a vector by a scalar multiplies each component by that number, which stretches the arrow by the scalar's size and reverses it if the scalar is negative. Adding vectors adds matching components, the same as placing the arrows tip to tail. The magnitude is |r| = √(rₓ² + r_y²), the straight-line length of the result measured from the origin. Because each component is linear in the scalars, doubling both α and β doubles the result and its length. The length itself is not linear, though: it must be recomputed from the new components, and it is never longer than |α|·|v| + |β|·|w|, the sum of the scaled lengths.

A worked example.

Example

Let v = (1, 3) with α = 2, and w = (4, 2) with β = −1. Scaling first: 2v = (2, 6) and −1·w = (−4, −2). Adding matching components gives x = 2 + (−4) = −2 and y = 6 + (−2) = 4, so the result is (−2, 4). Its length is √((−2)² + 4²) = √(4 + 16) = √20 ≈ 4.4721. The pieces were much longer: |2v| = 2√10 ≈ 6.3246 and |w| = √20 ≈ 4.4721, which add to about 10.797. Subtracting w turned much of 2v back on itself. And since 1 × 2 − 3 × 4 = −10 is not zero, v and w are not parallel, so some choice of scalars reaches every point in the plane.

scalar A2
scalar B-1
vector Ax1
vector By2
vector Ay3
vector Bx4

Frequently asked questions.

How do I find the scalars that produce a given target vector?
Solve two equations, one per axis. For a target (−2, 4) with v = (1, 3) and w = (4, 2), Cramer's rule gives α = ((−2)·2 − 4·4) ÷ (1·2 − 3·4) = −20 ÷ −10 = 2 and β = (1·4 − 3·(−2)) ÷ −10 = −1. This page computes forwards only, so check the answer by entering those scalars.
Why do all my results land on the same line?
Because v and w are parallel: one is a multiple of the other, such as (1, 2) and (2, 4). Their determinant vₓ·w_y − v_y·w_x is 1·4 − 2·2 = 0, and every combination is then just some multiple of (1, 2). Change either vector's direction to reach the rest of the plane.
Is the result's magnitude the scaled magnitudes added together?
Only when both scaled vectors point the same way. Otherwise the result is shorter, because some of each arrow cancels the other. In the example the scaled pieces measure about 6.32 and 4.47, yet the result is only about 4.47 long, since subtracting w undid much of 2v.
How do I find the midpoint between two points with this?
Treat each point as a vector from the origin and set both scalars to 0.5. For the points (1, 3) and (4, 2) that gives (0.5 + 2, 1.5 + 1) = (2.5, 2.5). Other weights that add to 1 give other points on the same line, such as 0.25 and 0.75 for a quarter of the way.
Can I combine three vectors, or vectors in three dimensions?
Not directly; the page handles two vectors with x and y components only. For three planar vectors, combine the first two, then enter that result with a scalar of 1 alongside the third. Three-dimensional vectors need a z-component, which this page has no field for.
How does this apply to adding two forces?
Set both scalars to 1 and enter each force's x and y components. A 30 N pull along x and a 40 N pull along y give a resultant of (30, 40) with a magnitude of 50 N. Scalars other than 1 are useful when one force is applied two or three times over.

How this page was produced

Published by
Quanta Calculator
Primary sources
3 cited below
Method
result = alpha*v + beta*w, component by component
Published
Last verified

Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 1560 calculators remain free
  • No billing is enabled
Coming soon