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
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.
- Enter the first scalar α and the x and y components of the first vector v.
- Enter the second scalar β and the components of w. Use a negative scalar to subtract a vector and 0 to leave it out.
- 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.
- Read the x and y components of the result, then its magnitude, which is in the same units as the components.
The formula.
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.
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.
Frequently asked questions.
How do I find the scalars that produce a given target vector?
Why do all my results land on the same line?
Is the result's magnitude the scaled magnitudes added together?
How do I find the midpoint between two points with this?
Can I combine three vectors, or vectors in three dimensions?
How does this apply to adding two forces?
References& sources.
- [1]OpenStax, Rice University. College Algebra 2e, 2021. Algebra and function chapters. Retrieved 2026-08-06.
- [2]OpenStax, Rice University. Precalculus 2e, 2021. Trigonometry and analytic geometry chapters. Retrieved 2026-08-06.
- [3]NIST/SEMATECH. e-Handbook of Statistical Methods, 2012. Chapter 1.3 and Chapter 4. Retrieved 2026-08-06.
How this page was produced
- Published by
- Quanta Calculator
- Overseen by
- Daniel, Quanta Calculator Researcher
- 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