Advertisement

Linear combination calculator

Enter two vectors in the plane. Choose whether to combine them with known coefficients or to find the coefficients that reach a target vector.

Calculator

Combination c1 u + c2 v
11, 16
Result
The combination 2 u + 3 v gives the vector shown.

Advertisement

How this calculator works

A linear combination of two vectors uses a scalar multiple of each and adds the results. When the coefficients are known, the answer is a new vector. When the target is known, finding the coefficients means solving a 2 by 2 linear system whose columns are u and v. That system has a unique solution exactly when the two vectors are not parallel. If they are parallel, the target is either unreachable or reachable in infinitely many ways.

Formula

w = c1 u + c2 v. In coordinates, w1 = c1 u1 + c2 v1 and w2 = c1 u2 + c2 v2.

Worked example

With u = (1, 2) and v = (3, 4), the combination 2u + 3v is (2 + 9, 4 + 12) = (11, 16). To express w = (5, 6) as c1 u + c2 v, solve c1 + 3c2 = 5 and 2c1 + 4c2 = 6, which gives c1 = -1 and c2 = 2.

Advertisement

Frequently asked questions

When is the coefficient pair unique?

When u and v point in different directions, so the 2 by 2 system has a non-zero determinant. Parallel vectors leave either no solution or infinitely many.

Can I combine more than two vectors?

This page handles two vectors, which matches the plane geometry in the inputs. Three or more vectors need a larger system or a matrix rank check.

What does the span of two vectors look like?

Two non-parallel vectors span the whole plane. Parallel vectors span only a line through the origin, so many targets are unreachable.

Sources

Advertisement