DEV Community

asharbloch
asharbloch

Posted on

Graph Linear Equations on Your TI-84: A 10-Minute TI-BASIC Starter

Learning to graph a linear equation by hand is one thing. Making your calculator do it — and checking your work — is a skill that pays off in every algebra class. This short tutorial shows you how, using a small TI-BASIC program you can type in yourself.

What you will build

A program that asks for the slope and intercept of a line, graphs y = mx + b, and prints the x-intercept. It is short enough to type in under ten minutes, and every line teaches you something about how TI-BASIC works.

The program

:Prompt M,B
:Disp "X-INTERCEPT IS", -B/M
:Y1=MX+B
:DispGraph
Enter fullscreen mode Exit fullscreen mode

Prompt asks you for the two numbers. Disp prints the x-intercept, which is where the line crosses the x-axis. The last two lines store the equation in Y1 and draw it.

Typing it in

Press PRGM, choose NEW, and name the program LINE. Type each line using the PRGM menus — Prompt is under I/O, Disp is under I/O too, and DispGraph is under I/O as well. Take your time with the menus; the first program is always the slowest, and the second one takes half as long.

Trying it out

Run the program and enter M = 2 and B = -4. The calculator should print an x-intercept of 2 and draw a line rising through the point (2, 0). Try M = -1 and B = 3 next: the intercept is 3, and the line falls from left to right. If the graph looks empty, press ZOOM and choose ZStandard to reset the window.

Three mistakes to avoid

  1. Forgetting the minus sign. The x-intercept formula is -B/M, not B/M. Getting the sign wrong flips the answer.
  2. Leaving an old equation in Y1. Clear Y1 before running the program, or an old graph can confuse you.
  3. A bad window. If your line is off-screen, it is not missing — your window is just wrong. ZStandard fixes it in one keypress.

Practise without the handheld

If your calculator is at school or out of battery, you can practise the exact same steps on a free online graphing calculator for algebra that runs in your browser. Enter the same slope and intercept, compare the graph with your handheld, and you will know immediately whether your program is right.

What to try next

Once this program works, extend it: ask for a second line and find where the two lines cross, or add a loop that keeps asking for new values until you press QUIT. Small programs like this are how real TI-BASIC skills start — one working program at a time.

Top comments (0)