Vector Basis

Author

Eric W. Weisstein
January 25, 2017

This notebook downloaded from http://mathworld.wolfram.com/notebooks/LinearAlgebra/VectorBasis.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/VectorBasis.html.

©2017 Wolfram Research, Inc. except for portions noted otherwise

Additional Authors

Code by Todd Rowland

Coefficients

LinearCombination[v_List?MatrixQ, w_] :=
    LinearSolve[Transpose[v], w]

m={{-1, 2}, {0, 1}};

LinearCombination[m, {-3, 4}]

Plus@@(m LinearCombination[m, {-3, 4}])

Diagram

The following diagram shows n(0.6, –0.5) + m(0.9, 0.2), which are linear combinations of the basis (0.6, –0.5), (0.9, 0.2).

V5

<<Graphics`Arrow`
<<Graphics`Colors`

arrgr[{v1_,v2_},n_,r_]:=Module[{a0,a1,a2,a3},a0=Table[Arrow[i v1+j v2,(i+1) v1+j v2],{i,-n,n},{j,-n,n}];
a1=Table[Arrow[i v1+j v2,i v1+(j+1) v2],{i,-n,n},{j,-n,n}];
Flatten[a0,1];
Flatten[a1,1];
a2=Join[{Red},a0,{Blue},a1];
a3=Graphics[a2];
Show[a3,Axes->True,Ticks->{r{-1,0,1},r{-1,0,1}},AspectRatio->Automatic,PlotRange->{r{-1,1},r{-1,1}}]
]

arrgr[{{.6,-.5},{0.9,.2}},4,2]