The Function row switches the curve between sin, cos, tan and cot. The general form y=Af(Bx−C)+D is the same for all four, so every control keeps working when you switch. Learn more about choosing the function
The equation above the graph restates the current curve, with each number in the colour of the parameter it belongs to: A red, B amber, C violet, D slate. The same four colours label the features on the graph. Learn more about the colour key
The sliders are split into two groups. Outside the function holds A and D, which act on the value the function returns and therefore move the curve vertically. Learn more about inside and outside
Drag A to stretch the curve away from its midline. The red bracket on the graph measures ∣A∣, and the two dots mark the maximum D+∣A∣ and the minimum D−∣A∣. Pull A below zero and the curve reflects across the midline, with the dashed grey curve showing where it came from. Learn more about setting A
Drag D to move the midline. The dashed slate line follows it to y=D, the maximum and minimum move with it, and the amplitude bracket keeps its length. Learn more about moving the midline
Drag B to change how many cycles fit the window. The amber bracket under the curve measures one full period, ∣B∣2π for sine and cosine and ∣B∣π for tangent and cotangent. Learn more about setting B
Drag C to shift the curve sideways. It moves in steps of 12π, and the violet bar at the top of the graph measures the actual displacement, which is BC and not C. The readout strip prints both numbers side by side so the difference is visible whenever B=1. Learn more about why the shift is C over B
The Guided walk buttons set all four parameters at once, one idea per button: the general form, amplitude, a negative A, a doubled B, the BC trap, a raised midline, all four together, and tangent. The explanation panel follows whichever you press. Learn more about the guided walk
The strip along the bottom reads the current curve back as numbers: amplitude, period, C itself, the shift BC, the midline, and the maximum and minimum. Each label carries its parameter colour. Learn more about reading the numbers
The Explanations panel on the right names the four letters, then explains whichever one you last touched. Choosing tan or cot switches it to the unbounded case, where amplitude has no meaning because the curve has no peak to measure. Learn more about the explanations panel
Outside the function — acts on the output, moves the curve vertically
Aamplitude|A| tall
Dvertical shiftmidline
Inside the function — acts on the input x, moves the curve horizontally
Bperiod2π/|B|
Cphase shiftshift C/B
Guided walk
Amplitude |A|
1.0
Period
2π
C itself
0
Shift C/B
0
Midline D
0.0
Max / min
1.0 / -1.0
Explanations
Aamplitude — half the height, from midline to peak
Bperiod — how many cycles fit the window
Cphase shift — how far sideways, by C/B
Dvertical shift — where the midline sits
y = A f(Bx - C) + D. Four letters, four separate jobs. Move one slider and exactly one feature of the curve responds; each is drawn on the graph in its own colour. Outside the function, A and D act on the value it returns, so they work vertically. Inside, B and C act on the input x, so they work horizontally. Learn more about the general form · the guided walk
The Function row offers four buttons — sin, cos, tan and cot. The curve redraws immediately, and every other control keeps its current value, so switching function is a way of asking what the same four parameters do to a different shape.
The general form is the same in all four cases:
y=Af(Bx−C)+D
What changes with the function is what the parameters can be seen doing. On sin and cos the curve is bounded, so all four features are visible at once: a height, a cycle length, a horizontal displacement and a midline. On tan and cot the curve runs off the top and bottom of the frame between its asymptotes, so the height stops being measurable while the other three still are.
The two bounded functions differ only in where their cycle starts, which is why the tool marks the maximum and minimum rather than a starting point: those two dots sit in different places for sin and cos, and comparing them is the quickest way to see the quarter-cycle offset between the two graphs.
The Equation Bar and the Colour Key
Above the graph, the current curve is written out in full — for example y=2.0sin(2.00x−π)+1.0. Each number appears in the colour of the parameter it belongs to, and the same four colours are used everywhere else in the tool:
A is red, and labels the amplitude bracket, the maximum dot and the minimum dot.
B is amber, and labels the bracket under the curve that spans one period.
C is violet, and labels the bar across the top that measures the phase shift.
D is slate, and labels the dashed midline.
The colour is carried by the slider handle, the number box beside it, the parameter name, and the matching entry in the readout strip. Nothing on the graph is labelled with a bare letter and left for you to match up by guessing.
This matters most when two numbers in the equation are easy to confuse. The value of C is printed in violet in the equation, and the violet bar on the graph measures BC — the same colour, deliberately, because the point is that these two violet numbers are not equal unless B=1.
Setting the Amplitude with A
DemoOutside the function: A and D
Step 0 of 5
The A slider runs from −3 to 3 in steps of 0.1, and sits in the outside group because A multiplies the value the function returns.
As you drag it, the red bracket on the curve keeps measuring the distance from the midline to the peak. That distance is ∣A∣, never A: drag through zero into the negatives and the bracket length continues to grow while the readout keeps showing a positive number.
Three things move together when A changes. The peak rises to D+∣A∣ and the trough falls to D−∣A∣, both dots relabelling as they go. The midline does not move, because that is D's job. And the horizontal positions of the crossings do not move either, because A does nothing to the input.
At A=0 the curve collapses onto its midline. That is not a defect of the tool but the honest picture: with no vertical stretch left there is no wave, only the constant y=D.
Negative values are worth a deliberate pass. The dashed grey curve that appears is the positive-A wave, drawn so the reflection across the midline can be seen rather than asserted.
The D slider runs from −3 to 3 in steps of 0.1 and sits in the outside group beside A, because D is added after the function has returned its value.
The dashed slate line is the midline, and it tracks D exactly. Everything attached to it travels with it: the maximum stays at D+∣A∣, the minimum at D−∣A∣, and the red amplitude bracket keeps precisely the length it had before, because D leaves A alone.
That invariance is the point of having the bracket at all. Raising the midline raises the peak, and a reader who is only watching the peak can easily conclude that the wave grew taller. The bracket does not change length, which settles the question on sight.
The horizontal features ignore D completely: the period bracket keeps its width and the phase-shift bar keeps its position, since neither depends on anything happening outside the function.
For tan and cot the midline is still drawn and still moves with D, even though it is no longer halfway between a maximum and a minimum — there are none. It marks the height the branches pass through.
The frozen case is a raised midline, where D=2 and the amplitude bracket is unchanged.
Setting the Period with B
DemoInside the function: B and C
Step 0 of 5
The B slider runs from 0.25 to 4 in steps of 0.25 and belongs to the inside group, because B multiplies x before the function is applied.
The amber bracket beneath the curve spans one complete cycle, and its printed length is the period:
T=∣B∣2π
for sin and cos, and ∣B∣π for tan and cot. The window is fixed at [−2π,2π], so raising B visibly packs more cycles into the same span while the bracket shrinks to match.
Two readings are worth making deliberately. At B=2 the bracket is π wide and exactly two cycles fill the interval [0,2π]. At B=0.25 the bracket is 8π wide, wider than the window itself, so the bracket disappears and a single slow cycle stretches past both edges — the tool draws no bracket it cannot fit, rather than drawing a misleading one.
Nothing vertical responds. The amplitude bracket keeps its length and the midline holds its height, because B acts only on the input.
The C slider moves in steps of 12π from −2π to 2π, and its number box reads in multiples of π rather than in decimals.
The violet bar across the top of the graph measures the displacement of the curve from the origin. That displacement is:
phase shift=BC
and it is the single most common place to go wrong. Set B=2 and C=π: the equation bar shows π in violet, the bar on the graph measures 0.5π, and the readout strip prints both, side by side, under the labels C itself and Shift C/B.
The reason is visible in the algebra: the standard cycle begins where the argument is zero, so Bx−C=0 gives x=BC. The bigger B is, the less far the curve has to travel for the argument to catch up.
Leave B=1 and the two numbers agree, which is exactly why the error survives so long — every example with B=1 confirms the wrong rule as loudly as the right one.
The frozen case is a shifted wave, the one place where C and the shift are different numbers.
The Guided Walk
DemoGuided walk and explanations panel
Step 0 of 5
The eight Guided walk buttons each set all four parameters at once and point the explanation panel at one idea. They are meant to be pressed in order, but any of them can be taken alone.
form — the baseline y=sinx, every parameter at its neutral value.
A = 3 — a vertical stretch with nothing else touched.
A < 0 — the reflection across the midline, with the dashed ghost of the positive wave.
B = 2 — two cycles where there was one, the bracket halving to π.
C/B — B=2 with C=π, the case where the shift and C differ.
D = 2 — the midline raised, the amplitude bracket unchanged.
all four — y=2sin(2x−π)+1, every parameter away from neutral at once.
tan — the unbounded case, where amplitude stops being defined.
Pressing a walk button clears the free-exploration state; moving any slider afterwards releases it again, so the walk is a set of starting points rather than a mode you have to leave.
The strip along the bottom of the controls states the current curve as six quantities, each in its parameter's colour: amplitude, period, C itself, the shift, the midline, and the maximum and minimum as a pair.
It exists so that the tool can be run backwards. Reading a graph means recovering these numbers from the picture, and the standard order is midline first, then amplitude, then period, then phase shift:
D=2max+min∣A∣=2max−min
Both readings are on screen at once — the dots give the maximum and minimum, the strip gives D and ∣A∣ — so a guess can be checked immediately rather than at the end of a worked exercise.
Two entries are deliberately redundant. C itself and Shift C/B would be one column in a tidier layout, and are two here because the difference between them is the thing most often lost. For tan and cot the amplitude entry reads none and the maximum and minimum read unbounded, rather than printing a number that would not mean anything.
The Explanations Panel
The panel on the right of the tool has two parts. The top is a fixed legend naming the four letters in their colours — A amplitude, B period, C phase shift, D vertical shift — each with a one-line gloss of what it controls. The letter you last touched is set in bold, so the legend doubles as a reminder of where your attention was.
Below the legend is the explanation itself, and it follows you. Drag a slider and the panel switches to that parameter; press a guided walk button and it switches to the idea that button demonstrates. Choose an or cot and it switches to the unbounded case, whatever you touched before, because on those functions the amplitude explanation would be describing something that does not exist.
Every explanation ends with two links into this page: one to the frozen state that shows the idea, one to the section that explains the control. Two short red notes can also appear under the explanation. One says the curve is reflected, when A is negative; the other prints C beside rac{C}{B} whenever the two differ. They stay visible while you work on something else, so a negative A or a shift that is not equal to C never goes unnoticed.
Inside and Outside the Function
The four parameters are not four unrelated knobs. They divide cleanly in two, and the division is structural rather than a convention of notation.
B and C sit inside the function, acting on x before sin or tan ever sees it. Whatever they do, they do to the input axis: B rescales it and C slides it. A and D sit outside, acting on the number the function has already returned: A rescales that value and D adds to it.
Everything else follows from this. Amplitude and midline are vertical because they come from outside operations. Period and phase shift are horizontal because they come from inside ones. The two groups never interfere: dragging B cannot change the height of a peak, and dragging A cannot move a zero crossing sideways.
The inside operations also explain their own arithmetic. An inside factor of B compresses the axis by B, which is why the period is divided by ∣B∣ and why the displacement produced by C is likewise divided by B. The same reasoning applies to any function of x, not only to the trigonometric ones — this is the general theory of function transformations, seen on a curve where all four effects are visible at once.
Why Tangent and Cotangent Have No Amplitude
Amplitude is defined as half the distance between the maximum and the minimum. Tangent and cotangent have neither: between consecutive asymptotes the branch runs from −∞ to ∞, so there is no highest point to measure from and no lowest one to measure to.
The tool says so rather than hiding the controls. On tan and cot, the amplitude readout reads none, the maximum and minimum read unbounded, the red bracket is not drawn, and the explanation panel switches to the unbounded case.
A itself still works, and still does something worth watching: it scales every value of the function by the same factor, steepening or flattening the branches. What it no longer does is set a height, because there is no height. A negative A still reflects the branches across the midline, which for tangent turns a rising branch into a falling one — the shape of cotangent, though not cotangent itself, since the asymptotes stay where tangent's are.
The period also halves relative to the bounded case. Tangent repeats every π rather than every 2π, so its period is ∣B∣π, and the amber bracket is correspondingly narrower at the same value of B.
The frozen case is the tangent case, where the amplitude bracket is absent by design.
From a Graph Back to an Equation
The reverse problem — given a drawn curve, write its equation — uses exactly the quantities this tool displays, in a fixed order.
Read the midline first, as the horizontal line halfway between the highest and lowest points; that is D. Read the amplitude next, as the distance from that line to a peak; that is ∣A∣, with the sign decided by whether the curve leaves the midline upward or downward. Read the period third, as the horizontal distance covered by one complete cycle, and convert it with B=T2π. Read the phase shift last, by finding where a standard cycle begins, and recover C from C=B×shift — the step where the division by B has to be undone rather than forgotten.
This tool supports the practice rather than performing it: set the four sliders to your reading and compare the curve you get with the curve you were given. If they differ, the readout strip shows which of the four quantities disagrees.
The worked procedure, and the key-point method for drawing such a curve by hand, are treated on the trigonometric graphs lesson page.
The Baseline Wave
Every comparison in this tool is measured against one curve: y=sinx, with A=1, B=1, C=0 and D=2 replaced by D=0. It is what the Reset button restores and what the first button of the guided walk loads.
y = sin x, the baseline state
Every parameter at its neutral value: amplitude 1, period 2π, no shift, midline on the x-axis. The four annotations name the four features the sliders move.
In this state the midline sits on the x-axis, the amplitude bracket measures 1, the period bracket spans 2pi, and there is no phase-shift bar at all, because a displacement of zero is not drawn. Each of the states below changes exactly one of those readings, which is what makes them comparable.
A Stretched Wave
Setting A=3 and leaving everything else alone is the cleanest demonstration that amplitude is a vertical quantity and nothing else.
A = 3, everything else unchanged
The red bracket measures 3 and the dots read max = 3, min = −3. The period bracket and the crossings sit exactly where they did at A = 1, because A acts outside the function.
The peak has climbed to 3 and the trough has fallen to −3, so the red bracket now measures 3. Compare the horizontal features with the baseline wave: the period bracket has the same width and the zero crossings sit at the same places. A stretch away from the midline moves no point sideways.
A Reflected Wave
At A=−2 the tool draws two curves. The solid one is y=−2sinx; the dashed grey one is y=2sinx, the wave it is a reflection of.
A = −2, with the positive wave dashed behind it
The solid curve is the dashed one mirrored in the midline. The maximum and minimum dots have traded places, and the amplitude readout stays at |A| = 2, because a distance is never negative.
Read the two together and the rule is visible rather than asserted: every point of one is the mirror image of the other in the midline, the maximum and minimum dots have swapped places, and the amplitude readout stays at ∣A∣=2. The sign of A decides which way the curve leaves the midline; the size of A decides how far it goes.
A Doubled Frequency
With B=2 the input axis is compressed by a factor of two, which is the whole content of the period formula T = rac{2\pi}{|B|}.
B = 2, the period halved
One cycle now spans π instead of 2π, so two cycles fill the interval that held one. The amplitude bracket is the same length as before: an inside factor rescales the horizontal axis only.
The amber bracket is now pi wide instead of 2pi, and two complete cycles fit in the interval that previously held one. Nothing vertical has moved: the bracket measuring ∣A∣ is the same length as in the baseline wave, and the midline has not shifted. An inside factor rescales the horizontal axis only.
A Shifted Wave
This is the state the whole tool exists for. Here B=2 and C=pi, so the equation bar prints pi while the violet bar on the graph measures rac{pi}{2} — the phase shift is rac{C}{B}.
B = 2 and C = π, so the shift is π/2
The equation carries C = π while the violet bar measures π/2. The standard cycle begins where Bx − C = 0, which is x = C/B — the division by B is the step most often skipped.
The two violet numbers in the readout strip, C itself and Shift C/B, are deliberately printed side by side in this state. The curve begins its standard cycle where the argument Bx−C is zero, which is x = rac{\pi}{2}, and the bar measures from the origin to exactly that point. Set B back to 1 and the two numbers coincide again.
A Raised Midline
At D=2 the entire curve moves up by two units, which is all a vertical shift does.
D = 2, the midline lifted
The dashed midline has moved to y = 2 and carried the maximum and minimum with it, to 3 and 1. The amplitude bracket has not changed length, which is how you tell a lift from a stretch.
The dashed slate line has moved to y=2, the maximum reads 3 and the minimum reads 1, both still exactly ∣A∣ away from the midline. The red bracket is the check: it has the same length it had in the baseline wave, so the wave was lifted, not stretched. The period bracket and the crossings are untouched.
All Four at Once
The state y=2sin(2x−pi)+1 puts every parameter away from its neutral value at the same time, which is how sinusoids actually arrive in problems.
y = 2 sin(2x − π) + 1
All four parameters away from neutral at once. Each annotation still reports one parameter: amplitude 2, period π, shift π/2, midline 1, with the peak at 3 and the trough at −1.
Each annotation still reports its own parameter and nothing else: the red bracket measures 2, the amber bracket spans π, the violet bar measures rac{\pi}{2}, and the dashed midline sits at y=1, with the peak at 3 and the trough at −1. Reading them in the order midline, amplitude, period, shift is exactly the procedure described in reading the curve back as numbers.
The Tangent Case
Switching the function to an keeps the same four sliders and drops one annotation, because amplitude has no meaning for an unbounded curve.
y = tan x, the unbounded case
No amplitude bracket and no maximum or minimum dots, because the branches run to infinity between the dashed asymptotes. The period bracket survives and spans π, half the sine and cosine value.
There is no red bracket and there are no maximum or minimum dots — there is nothing to measure them against. The dashed red lines are the asymptotes, and between any two of them the branch covers every real value. What survives is the amber bracket, now spanning pi rather than 2pi, the midline, and the phase-shift bar. The readout strip states the absence in words, printing none for amplitude and unbounded for the maximum and minimum.
Related Concepts and Tools
This tool assumes the six graphs are already familiar and asks what four numbers do to them. The neighbouring pages come at the same material from other directions.
The Trigonometric Functions Graphs explorer plots each of the six functions in its unmodified form and slides a marker along the curve, reading off values angle by angle — the right place to start if the shape of sin, tan or csc is not yet settled.
The Angle Explorer and the Unit Circle treat the input side: what an angle is, how it sits in standard position, and where the values being plotted here actually come from. The Unit Circle Visualizer is the tool version of that: it turns the angle and reads the coordinates the wave is built from, one special angle at a time.
For the theory behind each parameter in prose form, with worked examples and the full derivations, the Trigonometric Graphs lesson covers the general sinusoidal form, amplitude, period, phase shift and vertical shift as separate sections. The Properties of Trigonometric Functions page covers periodicity, boundedness and asymptotes, which is where the tangent and cotangent case is argued rather than simply stated.