Chapter 6 - Basic Vector Algebra Topics

Section 6.4 - Vector Projection

Example 6.4.1

W={9,8};V={17,0};

ProjWontoV={9,0};

ArrowPlots1=Graphics[{Arrowheads[.10],Thickness[.010],Blue,Arrow[{{0,0},W}],Black,Arrow[{{0,0},V}],Red,Arrow[{{0,0},ProjWontoV}]}];

TxtPlots1=Graphics[{Black,Text["W",{8,8}],Text["V",{17,0.5}],Text["ProjWontoV",{4,-0.75}],Text["θ", {3.25,1.1}]}];

ArcPlot1=Graphics[{Black,Thickness[0.010],Circle[{0,0},5.5,{0,ArcTan[8/9]}]}];

LinePlots1=Graphics[{Thickness[.005],Black,Line[{W,ProjWontoV}]}];

RightAnglePlot1=Graphics[{Black,Rectangle[ProjWontoV,ProjWontoV+{1,1}]}];

Show[ArrowPlots1,TxtPlots1,ArcPlot1,LinePlots1,RightAnglePlot1]

Example 6.4.2

W={9,8};V={-17,0};

ProjWontoV={9,0};

ArrowPlots2=Graphics[{Arrowheads[.10],Thickness[.010],Blue,Arrow[{{0,0},W}],Black,Arrow[{{0,0},V}],Red,Arrow[{{0,0},ProjWontoV}]}];

TxtPlots2=Graphics[{Black,Text["W",{8,8}],Text["V",{-17,0.5}],Text["ProjWontoV",{4,-0.75}],Text["θ", {-1.,1.75}]}];

ArcPlot2=Graphics[{Black,Thickness[0.010],Circle[{0,0},5.5,{ArcTan[8/9],π}]}];

LinePlots2=Graphics[{Thickness[.005],Black,Line[{W,ProjWontoV}]}];

RightAnglePlot2=Graphics[{Black,Rectangle[ProjWontoV,ProjWontoV+{1,1}]}];

Show[ArrowPlots2,TxtPlots2,ArcPlot2,LinePlots2,RightAnglePlot2]

Example 6.4.3

V={-5,9,-12};W={7,4,8};

ProjWontoV=(W.V)/((Norm[V])^2) V

ArrowPlots3=Graphics3D[{Arrowheads[.1],Thickness[.015],Red,Arrow[{{0,0,0},W}],Black,Arrow[{{0,0,0},V}],Blue,Arrow[{{0,0,0},ProjWontoV}]}];

TxtPlots3=Graphics3D[{Black,Text["V",{-2,4,-3}],Text["W",{4,3,3}],Text["ProjWontoV",{2,-5,2}]}];

Show[ArrowPlots3,TxtPlots3,Axes->True,ViewPoint->{-7.5,3.5,4},AxesLabel->{x,y,z}]

Example 6.4.4

L=20 x-32 y==165;

LPerpP=32 x+20 y==32 (-7)+20*13

SolnPt=Solve[{L,LPerpP},{x,y}][[1]]

V={20,-32};

P={-7,13};Q={14,5/8*14-165/32};

ProjectPQtoV=(Q-P).V/((Norm[V])^2)V

N[Abs[(V.P-V.Q)/Norm[V]]]

PtsPlots4=Graphics[{PointSize[0.03],Blue,Point[{P,Q}]}];

LinePlot4=ContourPlot[Evaluate[L],{x,-12,20},{y,-20,20},ContourStyle->{{Black,Thickness[0.005]},{Blue,Thickness[0.01]}},PlotRange->All,Frame->False];

ArrowPlots4=Graphics[{Arrowheads[.10],Thickness[.010],Blue,Arrow[{P,P+V}],Black,Arrow[{P,Q}],Red,Arrow[{P,P+ProjectPQtoV}]}];

TxtPlots4=Graphics[{Black,Text["V",{8,-9}],Text["PQ",{5,9}],Text["ProjectPQtoV",{-7,5}],Text["L",{-10,-9}],Text["P",{-9,13}],Text["Q",{16,3}]}];

RightAnglePlot4=Graphics[{Black,Polygon[{{x,y}/.SolnPt,({x,y}+{1,-1.6})/.SolnPt,({x,y}+{2.6,-0.6})/.SolnPt,({x,y}+{1.6,1})/.SolnPt}]}];

Show[LinePlot4,ArrowPlots4,TxtPlots4,PtsPlots4,RightAnglePlot4]

Example 6.4.5

Plane=2 x-3 y+6 z==1;

LPerpThruPlane={((x−1)/2)==((y−1)/(−3)),((y−1)/(−3))==((z−7)/6)};

SolnPt=Solve[Append[LPerpThruPlane,Plane],{x,y,z}]

Plane/.SolnPt

V={2,-3,6};P={1,1,7};Q={1,1,1/3};

ProjPQtoV=((Q-P).V)/((Norm[V])^2) V

P+ProjPQtoV

N[Abs[(V.P-1)/Norm[V]]]

PtsPlots5=Graphics3D[{Black,Sphere[P,0.5],Black,Sphere[Q,0.5],Black,Sphere[P+ProjPQtoV,0.5]}];

PlanePlot5=ContourPlot3D[Evaluate[Plane],{x,-10,10},{y,-10,10},{z,-10,10},Mesh->None,ContourStyle->LightBlue,AspectRatio->1/2];

ArrowPlots5=Graphics3D[{Arrowheads[.05],Thickness[.010],Red,Arrow[{P,P+V}],Black,Arrow[{P,Q}],Blue,Arrow[{P,P+ProjPQtoV}]}];

TxtPlots5=Graphics3D[{Black,Text["V",{2,-2,10}],Text["PQ",{2,0,3}],Text["ProjPQtoV",{-2,6,3}],Text["P",{1,0.5,7}],Text["Q",{1,-0.5,1/3}]}];

Show[PtsPlots5,ArrowPlots5,PlanePlot5,TxtPlots5,Axes->True,AxesLabel->{x,y,z},ViewPoint->{-7,-5,5}]