Adding Vectors Graphically on TI83/84
Copyright © 2004–2017 by Stan Brown
Copyright © 2004–2017 by Stan Brown
Summary: You can add vectors (or complex numbers) graphically on your TI83 or TI84 with a simple program, presented here. The hard part, also presented here, is automatically adjusting all the window parameters to show the vectors in proper perspective.
VECADD will prompt for two vectors, then display the result vector numerically and graphically. You can enter the vectors in component form or lengthmagnitude form. The program gives the result vector’s components, length, and magnitude.
See also: If you don’t want the graphics, you can treat the vectors as complex numbers in a+bi form and just add them. Complex Numbers on TI83/84 explains.
If you have the TI Graph Link software, you can download the program from this ZIP file (25 KB, revised 28 Dec 2016), unzip it to any convenient directory, and download it to your TI83 or TI84.
Otherwise, you can enter the program manually, as shown below.
Press the [PRGM
] key, and select
VECADD
; see prgmVECADD
appear on
your home screen. Press [ENTER
] to run the program.
Example: vectors [3,−8] and [5,6].
ENTER
], VECADD shows you the two
input vectors and the result. The program automatically adjusts the
screen margins, aspect ratio, and grid spacing.
You can redisplay the numbers by pressing
[2nd
MODE
makes QUIT
], then return to the graph by pressing
[GRAPH
].
Example: vectors 15.00∠38° and 27.00∠130°. The VECADD program can deal with vectors in lengthangle form — you just enter the x as (length) cos(angle) and the y as (length) sin(angle). The calculator computes and displays the input vectors in component form.
As before, the result vector is displayed both as components and in lengthangle form, 30.43∠100.5° in this case. On the graphical display, the grid spacing is automatically adjusted to dots every 10 units.
It’s easiest to download the program, if you have the TI Graph Link software. Failing that, you can keyboard it following these instructions.
If you’re not familiar with TI83/84 programming instructions, you might want to practice first with a shorter program, like the quadratic equation solver.
The program VECADD divides into four phases:
I’ll show you each phase, discuss the meaning of the instructions, and tell you which keystrokes to use where they’re not obvious.
Create a new program and assign it a name, such as VECADD.  [PRGM ] [► ] [► ] [ENTER ]
Press the keys for the green letters in VECADD. For instance, green V is above the [ 6 ] key, so you press
[6 ] and see the V appear on screen.
After typing in the program name, press [ ENTER ]. 
Each vector has an x and a y component. It would be logical
to call them X1,Y1 and X2,Y2, but the TI83/84 allows only singleletter
variables so we’ll use A,B and C,D. Your program starts like this:
Input "X1:",A Input "Y1:",B Input "X2:",C Input "Y2:",D 
For the Input command, press
[PRGM ] [► ] [1 ].
Then press these keys:

Clear the screen, and show the input vectors for reference.
Note the curly braces { } , which make
the TI83/84 keep the components together.
ClrHome Disp {A,B} Disp {C,D} 
For ClrHome , press [PRGM ] [► ] [8 ].
Finish with [ENTER ], as for every command.
For Disp , press [PRGM ] [► ] [3 ].
Continue
with [2nd ( makes { ] [ALPHA MATH makes A ] [, ] [ALPHA APPS makes B ]
[2nd ) makes } ]. Enter the
second Disp command in a similar way. 
At this point — actually, at any
point — you can press [2nd
MODE
makes QUIT
] to leave
the program editor. Later, when you’re ready to continue entering
program commands, press [PRGM
] [►
] and select
VECADD
.
Two short lines compute the vector sum. (You store components of the result vector in variables E and F, not X and Y, because the TI83/84 changes X and Y while drawing lines.)
As with most programs, displaying the results takes more work than computing them! Here you’ll display the result vector in both component form and lengthangle form, then prompt the user to continue.
To display the input vectors and compute the result vector,
you need to enter these program commands:
A+C→E B+D→F 
To store the x component of the result vector in
variable E, type [ALPHA MATH makes A ] [+ ] [ALPHA PRGM makes C ]
[STO→ ] [ALPHA SIN makes E ].
Repeat to store the y component in variable F. 
Next you want to display the output vector’s components,
length, and magnitude. To do that, enter these commands:
Output(3,1,"X:") Output(3,3,E) Output(4,1,"Y:") Output(4,3,F)  The Output command is [PRGM ] [► ] [6 ].
Recall that the quote mark is [ALPHA + makes " ]
and the colon is [ALPHA . makes : ]. 
Output(5,1,"R:") Output(5,3,R→Pr(E,F)) 
For R→Pr , press [2nd APPS makes ANGLE ]
[5 ]. 
Output(6,1,"θ:") Output(6,3,R→Pθ(E,F))  θ is [ALPHA 3 makes θ ].
For R→Pθ , press [2nd APPS makes ANGLE ]
[6 ].

Disp "","","",""," PRESS ENTER" 
The Disp command (reminder: [PRGM ] [► ] [3 ])
starts with four empty strings to move past the output.
The “space bar” is [ALPHA ]shifted [0 ].

Pause 
[PRGM ] [8 ] 
At this point you might want to run the program to make sure that the computations and text displays are correct.
The next phase of the program adjusts the parameters on the Window screen to fit all three vectors on the screen. This is the most complex section of the program, but it’s much better to have the program set up the screen than force the user to do it each time.
To begin this phase, set the four screen margins.
Input vector 1 goes from (0,0) to (A,B), vector 2 goes from (0,0) to
(C,D), and the result goes from (0,0) to (E,F).
The program sets Xmin
to the smallest of all those x
endpoints
and Xmax
to the largest, then sets Ymin
and
Ymax
to the smallest and largest y endpoints.
min( )
selects the smallest in
a list of numbers, and max( )
selects the largest.
Note the braces inside the parentheses, needed to
make the TI83/84 treat the numbers as a list.
min({0,A,C,E})→Xmin 
min( is [MATH ] [► ] [6 ].
The left parenthesis appears automatically. For the
left brace press [2nd ( makes { ], then continue with
[0 ] [, ] [ALPHA MATH makes A ] [, ] [ALPHA PRGM makes C ]
[, ] [ALPHA SIN makes E ] [2nd ) makes } ] [) ]. Store
into Xmin with [STO→ ] [VARS ] [1 ] [1 ]. 
max({0,A,C,E})→Xmax 
The second line is the same, except max( is
[MATH ] [► ] [7 ] and Xmax is
[VARS ] [1 ] [2 ]. 
min({0,B,D,F})→Ymin max({0,B,D,F})→Ymax 
In the third and fourth lines, Ymin is
[VARS ] [1 ] [4 ] and Ymax is [VARS ] [1 ] [5 ]. 
You want some dots on the screen, preferably enough to guide the eye without cluttering up the display. The following computation looks at whether the x or y range is greater and sets between 2 and 20 dots in that direction, sets the other direction to have the same dot spacing, and turns the grid on.
Enter these two lines as one:10^int(log(max(XmaxXmin, YmaxYmin)/2))→Xscl 
int( is [MATH ] [► ] [5 ].
You know how to do all the rest up to Xscl , which is
[VARS ] [1 ] [3 ].

Xscl→Yscl 
Yscl is [VARS ] [1 ] [6 ]. 
GridOn 
[2nd ZOOM makes FORMAT ]
[▼ ] [▼ ] [► ] [ENTER ]. 
Because the screen isn’t square, the program needs to adjust
either the horizontal or the vertical value of a pixel. This is
essentially what happens when you do ZSquare
(zoom square).
max({ΔX,ΔY})→ΔX max({ΔX,ΔY})→ΔY 
Recall that max( is on the
[MATH ] [► ] menu, and braces are [2nd ]shifted
parentheses.
ΔX is [VARS ] [1 ] [8 ], and
ΔY is [VARS ] [1 ] [9 ]. 
Now that the screen margins and grid have been set up, it’s time to draw the vectors.
Before making the new drawing, the program must clear any
previous drawing and turn off any function plots and stat plots:
ClrDraw FnOff PlotsOff 

Finally, the program will draw five lines: the two input
vectors, the other sides of the parallelogram, and the result vector,
which is the diagonal of the parallelogram:
Line(0,0,A,B) Line(0,0,C,D) Line(A,B,E,F) Line(C,D,E,F) Line(0,0,E,F) 
For Line( , press [2nd PRGM makes DRAW ] [2 ].
Enter the four arguments and the closing right parentheses. Repeat for
the other four lines. 
This finishes the program. Leave the program editor by returning to the home screen.  [2nd MODE makes QUIT ] 
Now reap your reward by running the program.
2nd
]
and [ALPHA
] combinations; cross reference to
simple numeric addition.Updates and new info: https://BrownMath.com/ti83/