Linear Combination

Find scalar coefficients that express a target vector as a linear combination of given vectors.

Turn coefficients into equations

Put the candidate vectors in the coefficient columns and the target in the augmented column. The unique solution gives coefficients 2 and 1.

lincomb([[1, 2, 4], [2, 3, 7]])

Read coefficients directly

The standard basis columns select target components without changing them. The target vector 2, 3 therefore has coefficients 2 and 3.

lincomb([[1, 0, 2], [0, 1, 3]])

Allow rational coefficients

The coefficient system need not have an integer answer. Exact row reduction produces fractions that can be substituted back into the combination.

lincomb([[2, 1, 7], [1, −1, 1]])

Practice

Practice: problems like this one, made and checked in your browser.

Recap

  • A linear combination multiplies each vector by a coefficient and adds.
  • The augmented system determines the coefficients.
  • A unique coefficient vector can be checked directly against the target.