In short
Every non-vertical straight line in the plane is built from two numbers. The slope m controls how tilted it is — push m up and the line steepens, drop m below zero and the line flips into a downhill slant. The y-intercept c controls where the line crosses the y-axis — slide c up and the whole line lifts; slide c down and it sinks. The widget below gives you both knobs. Drag, watch, and the formula y = mx + c stops being a symbol and becomes a thing you can steer.
You have probably written y = mx + c a hundred times — it is the headline form of a linear equation in your CBSE Class 9 and 10 books. But writing it does not always make you feel what m and c do. The cure is to stop writing and start dragging.
The widget below is a little laboratory. Two sliders, one line. Move the slope slider and the line spins around the point where it meets the y-axis. Move the intercept slider and the whole line slides up or down without changing its tilt. After a minute of play, you will not need the formula to predict what the line does — your hand will already know.
The two knobs
The blue line is the graph of y = mx + c for whatever values the sliders are set to. The green dot is the y-intercept — the point where the line crosses the y-axis, with coordinates (0, c). The red dot is one extra check-point: plug x = 5 into the equation and you get y = 5m + c, which is exactly where the red dot lives. Two dots, one line — and they all dance together when you move a slider.
Why: the slope m is the rise over run — the change in y when x goes up by 1. Doubling m doubles every rise, so the line tilts harder. The intercept c is the value of y when x = 0, which is exactly where the line meets the y-axis. So m controls how steep, c controls how high — two independent knobs for two independent properties.
Three configurations to try
Three quick snapshots first, so you know what to look for when you start dragging.
Worked examples to drive the widget
Open the widget. Each example below is a sequence of slider moves with a prediction. Make the moves yourself and check whether the line behaves as predicted.
The slope dial — $c$ frozen at $0$
Set m = 1, c = 0. The line is y = x — a perfect 45° uphill line through the origin. The red dot sits at (5, 5), the green dot at (0, 0).
Now slide m from 1 up to 2. The line steepens — for every step you take to the right, the line now climbs two steps instead of one. The red dot rides up to (5, 10), hitting the top of the grid. The green dot stays glued to the origin, because c has not moved.
Slide m down through 0 to -1. As m passes through 0 the line briefly lies flat along the x-axis. Then it tilts the other way — now downhill. At m = -1, the line is y = -x, the mirror image of where you started. The red dot is now at (5, -5).
Why: changing m rotates the line around the green dot, because (0, c) always satisfies y = mx + c no matter what m is — at x = 0, the mx term vanishes. So the green dot is the pivot of the rotation, and only the tilt changes.
The intercept lift — $m$ frozen at $1$
Set m = 1, c = 0. The line is y = x again, passing through the origin.
Slide c up to 3. The whole line lifts by 3 units. Every point on the old line has a new partner exactly 3 units higher. The line is still tilted at 45° — the slope is unchanged — but the green dot has moved from (0, 0) up to (0, 3), and the red dot has moved from (5, 5) up to (5, 8).
Slide c down to -4. Now the entire line drops, crossing the y-axis at (0, -4). The red dot is at (5, 1). Same tilt, different elevation.
Why: adding c to mx adds c to every output. Geometrically, the rule "add a constant to y" shifts every point on the curve straight up by that constant — a vertical translation. The shape of the line never changes; only its position does.
The special cases — $m = 0$ and the missing vertical
Set m = 0 and c = 4. The equation collapses to y = 4 — a perfectly horizontal line, the same height everywhere. The red dot sits at (5, 4) and the green dot at (0, 4). Both have y = 4 because every point on this line does. Slide c around with m still at 0; the horizontal line slides up and down like a railing on a parallel rail.
Now try the opposite: a vertical line. You cannot. The slider for m stops at \pm 5, but a vertical line would need m = \infty, which no slider can reach. A vertical line has the equation x = k for some constant k — the variable y does not appear, so the form y = mx + c cannot describe it. This is the one type of line the widget cannot show, and the reason your textbook prefers the more general form ax + by + c = 0 for full coverage of all lines, vertical ones included.
Why: slope is rise-over-run. A vertical line has run = 0, so rise/run divides by zero and the slope is undefined. The form y = mx + c assumes you can write y as a function of x, which fails for verticals because one x would correspond to every y.
Reading m and c off any equation
Once your hands know the widget, reading the line off an equation becomes automatic. The form y = mx + c has m and c in fixed positions: m is the number multiplying x, c is the lone number on the right.
- y = 3x + 2: slope 3, intercept 2. Steeply uphill, crossing the y-axis at 2.
- y = -\tfrac{1}{2} x + 4: slope -\tfrac{1}{2}, intercept 4. Gently downhill, crossing the y-axis at 4.
- y = 7: slope 0, intercept 7. Horizontal at height 7.
- y = -x: slope -1, intercept 0. Downhill through the origin.
When the equation is not in mx + c form, rearrange first. The line 2x + 3y = 12 rearranges to y = -\tfrac{2}{3} x + 4, so m = -\tfrac{2}{3} and c = 4. Drop those into the widget and you will see the line that the recharge-shop equation in the parent article was hiding all along.
In CBSE Class 9 the form y = mx + c shows up as the standard route to the slope-intercept reading of a line; in Class 10 it underwrites the graphical method for systems of two equations, where two such lines are drawn and their crossing point is the simultaneous solution. The dragging skill you build here is the foundation for both.
Going deeper — what the widget does not show
Beyond two knobs
The form y = mx + c covers every line that can be written as a function of x — but as you saw above, vertical lines slip through. The fully general linear equation ax + by + c = 0 has three parameters and covers the vertical case too, at the cost of one redundant degree of freedom (you can scale all three by any non-zero constant and get the same line). When you study straight lines in Class 11, you will meet the slope-intercept form, the point-slope form, the intercept form, and the normal form — five flavours of the same object, each highlighting a different geometric feature. The widget here is the slope-intercept story; the others are different sliders on the same line.
References
- NCERT Class 9 Mathematics, Chapter 4: Linear Equations in Two Variables — the syllabus chapter where y = mx + c first appears formally.
- NCERT Class 10 Mathematics, Chapter 3: Pair of Linear Equations — the graphical method, which depends on reading m and c off two equations at once.
- Wikipedia: Linear equation — the slope-intercept form and other equivalent forms in one place.
- Khan Academy: Slope-intercept form — short videos with worked examples on identifying m and c.
- Desmos Graphing Calculator — a full-featured grown-up version of the widget above; type
y = mx + cand Desmos will create the sliders for you.