The domain of a linear function read straight off its graph is all real numbers, written (−∞, ∞), in every case except one: a ray or segment that stops at an endpoint. A plain non-vertical line keeps going in both directions, so no x-value is ever excluded. Vertical lines are the single exception — they aren't functions at all, and their domain collapses to one x-value.
That boundary is the whole answer. Everything below is about reading it accurately, because most lost points on this topic come from misreading an endpoint dot, confusing a vertical line with a steep one, or assuming a line "ends" where the printed axes do.
Why a Straight Line's Domain Is Always All Real Numbers
Pick any point on a non-vertical line, travel left, and you stay on the line. Travel right, and the same thing happens. Nothing in the graph of y = 3x − 7, or y = −0.5x + 2, or y = x, puts a wall anywhere on the x-axis. That's why the domain of every linear function is (−∞, ∞), which some textbooks write as "all real numbers" or ℝ.
The reason is algebraic, and it's worth seeing once. A linear function has the form f(x) = mx + b, and computing f(x) for any real number x requires only multiplication and addition — two operations that never fail on real numbers. Compare that with f(x) = 1/x, which fails at x = 0, or f(x) = √x, which fails for negative inputs. Those functions have restricted domains because their formulas hit an operation that breaks. Linear formulas have no such operation.
Students often confuse domain with range on a graph. Range restricts when the line is horizontal: y = 4 has range {4}, a single value, even though its domain is still (−∞, ∞). Domain restricts only when the graph stops sideways. If you remember nothing else, remember that horizontal restrictions affect range and vertical restrictions affect domain.
A quick arithmetic sanity check helps before you commit to an answer. Take y = 2x + 1 and evaluate it at x = −1,000,000 and at x = 1,000,000. You get −1,999,999 and 2,000,001 — real outputs at absurd inputs. That mental test is exactly what "all real numbers" means, and it takes five seconds.
Reading Domain Off a Graph: Five Steps That Catch Every Case
Follow these in order. Each step filters out a case the previous step would get wrong.
1: Run the vertical line test first. If any vertical line crosses the graph more than once, it isn't a function, and "domain of the function" is the wrong question. A straight non-vertical line always passes. 2: Check whether the line is vertical. A line like x = 3 fails step 1, but if you're asked for its domain anyway, the answer is the single value {3}, since x can only be 3. (Its range is all real numbers.) 3: Trace both ends with your eyes. Follow the line to the left edge of the image and to the right edge. If it reaches both edges without stopping, the domain is (−∞, ∞). Most textbook graphs are drawn this way. 4: Look for an endpoint dot. A solid dot means that endpoint is included; an open circle means it isn't. If you find one, the domain is bounded on that side. 5: Convert the endpoints into interval notation, using brackets for solid dots and parentheses for open circles or infinity.
Step 4 is where most errors happen, and the error is usually just notation. Students write [−3, ∞] with a square bracket on infinity. That's wrong in every textbook convention: infinity is a direction, not a number, so it never takes a bracket. Write [−3, ∞) instead.
Run the steps on a quick example. Graph: a line through (0, −1) with slope 1, drawn across the full grid. Step 1 passes. Step 2: not vertical. Step 3: reaches both edges. Answer: (−∞, ∞). The y-intercept of −1 is irrelevant to domain — it only shifts the line up or down, never sideways.
Interval Notation for Linear Domains, Including the Endpoint Traps
Interval notation compresses the answer into two symbols, and each symbol carries a specific meaning. Parentheses mean "not included." Brackets mean "included." Unions join separate pieces. For linear functions, you'll only ever need three patterns.
| Graph shape | Domain in interval notation | Included in set notation |
|---|---|---|
| Full non-vertical line | (−∞, ∞) | {x : x ∈ ℝ} |
| Ray starting at x = −3, solid dot | [−3, ∞) | {x : x ≥ −3} |
| Ray starting at x = 2, open circle | (2, ∞) | {x : x > 2} |
| Segment from x = −1 to x = 4, both solid | [−1, 4] | {x : −1 ≤ x ≤ 4} |
| Vertical line x = 5 | {5} | {x : x = 5} |
The distinction between a solid dot and an open circle comes from the definition of a function's domain: the set of inputs for which the function produces a real output. An open circle at x = 2 means the point (2, f(2)) is missing from the graph, so 2 is not in the domain. A solid dot at x = −3 means the point is there, so −3 is included.
Two traps deserve names. The infinity-bracket trap, described above, is the most common. The second is writing {5} for a vertical line as if it were a range — check which axis the line runs along before answering. A vertical line constrains x, so it constrains domain; a horizontal line constrains y, so it constrains range.
When the Line Stops: Rays, Segments, and the Endpoint Dot Rule
Some graphs show a ray or a segment instead of a full line. A ray has one endpoint and extends forever in one direction; a segment has two endpoints. Both are still linear over their domains, and both are common in algebra coursework because they force you to read endpoints.
Look at the endpoint dot before you write anything. A solid dot at (−2, 3) on a ray extending right gives domain [−2, ∞). Change that solid dot to an open circle and the answer becomes (−2, ∞). Same picture apart from a fill color, different answer. Teachers check this deliberately because it separates students who read endpoints from students who skim.
A segment behaves the same way at both ends. Solid dots at (−1, 2) and (4, 9) give [−1, 4]. An open circle at either end opens that bracket. When one end is open and the other closed — say open at x = −1, closed at x = 4 — the domain is (−1, 4].
A failure case worth knowing: a graph drawn with a straight vertical line at one end but no dot, just an abrupt cut-off at the edge of the grid. That's usually the graph being cropped, not the function ending, and the intended answer is (−∞, ∞). If the problem intends a restricted domain, it will show a dot. Confirm with your instructor if the image is ambiguous — that's the correct move, not guessing.
Vertical Lines: The One Case That Breaks the Rule
A vertical line like x = 3 is not a function. It fails the vertical line test because the single input 3 maps to infinitely many outputs. That's not a technicality you can ignore — it means the phrase "domain of this function" doesn't apply, and a well-posed problem will ask for the domain of the relation or the line itself instead.
If asked anyway, the domain is {3}, and the range is (−∞, ∞). Note that the bullets reverse: a vertical line tells you exactly one x-value and leaves every y-value open, so the domain is a singleton and the range is unrestricted. The horizontal line does the reverse — y = 5 has domain (−∞, ∞) and range {5}.
Students misidentify near-vertical lines as vertical on small graphs. A line with slope 10 or −20 looks steep but still passes the vertical line test, and its domain is (−∞, ∞). The test is a geometric check: does a single vertical pencil stroke touch the graph twice anywhere? If yes, not a function. If no, it is.
Real-world contexts occasionally produce true vertical cases, such as the formula for a circle's leftmost and rightmost edges. A circle isn't a function, either, which is why it gets split into two semicircle functions to have domains at all.
A Worked Example From Graph to Domain in Under a Minute
Suppose you're shown a line passing through (−4, −2) and (2, 4), drawn across the full grid with no endpoints visible. Find the domain.
Step 1: the line is straight and non-vertical, so it passes the vertical line test. Step 2: not vertical. Step 3: the line reaches both left and right edges of the graph. Step 4: no dots. Answer: (−∞, ∞). The full computation takes about fifteen seconds.
Now change one detail. Suppose the graph instead shows a ray with an open circle at (−4, −2), extending up and right through (2, 4). The domain is now (−4, ∞). The slope doesn't matter — it never does for domain on a non-vertical line. Find the slope if the problem asks for it: rise 6 over run 6 gives slope 1. But slope and intercept are range-and-shape facts, not domain facts.
This is where many students waste time. They compute slope and y-intercept when the domain question needs neither. Skip both unless the problem asks.
Domain vs. Range: Pulling Both Off One Line Without Mixing Them
On a non-vertical line, domain is always (−∞, ∞); range is always (−∞, ∞) unless the line is horizontal. That single sentence handles the most common graph-reading task in algebra. A horizontal line y = 4 has domain (−∞, ∞) and range {4} — one full, one a single value.
On a ray or segment, both can be restricted, and the direction of the restriction flips with the line's slope. On a ray starting at (−2, 1) and rising to the right, the domain is [−2, ∞) and the range is [1, ∞) because y also grows without bound. On a ray starting at (−2, 5) and falling to the right, the domain is [−2, ∞) but the range is (−∞, 5] because y decreases from 5 without limit. Students who assume domain and range share bounds on sloped graphs get the range wrong.
A clean way to separate the two: domain lives on the x-axis, range lives on the y-axis. Flatten the graph onto the x-axis and read the domain; flatten it onto the y-axis and read the range. That's a projection, and it's literally what the intervals measure.
Horizontal lines deserve one final check. In y = 4, the range is {4}, which many students want to write as [4, 4]. Both are technically correct, but {4} is the standard. The domain, meanwhile, is unaffected by the horizontal shape.
Five Domain Errors Teachers Deduct Points For
The most expensive errors in this topic are small notation slips, and each has a straightforward fix.
1: Bracketing infinity. [3, ∞] should be [3, ∞). Infinity never gets a bracket. 2: Using set braces for intervals. Writing {−3, ∞} instead of [−3, ∞) mixes two conventions and is marked wrong in most curricula. 3: Confusing open and solid dots. Train yourself to glance at the dot before writing a bracket or parenthesis. 4: Answering range when asked for domain. Recheck which variable the question names. 5: Calling a vertical line a function. The domain answer {3} is fine; describing x = 3 as a function is not.
Each of these costs points on a quiz where the concept is fully understood. The underlying math isn't the problem — the notation is.
Checking Your Answer Against the Equation and the Context
The formula gives you a second way to confirm what the graph shows. In f(x) = mx + b, ask: is there any real x that would make the computation break? For linear formulas, the answer is always no, so the domain is all reals. If you find a restriction, you're looking at a piecewise, rational, or radical function that happens to look like a line, not a true linear function.
Real-world contexts genuinely restrict domains even when the formula doesn't. A linear cost model C(x) = 12x + 40 describing t-shirts has a mathematical domain of all reals but a sensible domain of x ≥ 0, since you can't order negative shirts. Tests sometimes want the contextual domain, sometimes the mathematical one, and the problem's wording signals which. Words like "in this context" or "reasonable domain" point to the restricted answer.
If a problem's answer choices contradict your reading, re-examine the dot and the grid edges. Assume the graph is drawn correctly and that the ambiguity lies in how you read it. In every case, the final answer should name the interval, explain the endpoint evidence, and confirm the graph passed the vertical line test.
FAQ
Is the domain of a linear function always all real numbers?
Yes — for every true linear function, domain is (−∞, ∞). The only graph-shape exception is a vertical line, which isn't a function. Horizontally restricted pieces like rays appear in problems about linear graphs or piecewise pieces, not full lines.
What's the domain of a vertical line like x = −2?
The domain is {−2}, a single value, because every point on the line has x = −2. Its range is (−∞, ∞). If a test asks you to call x = −2 a function, that's a trick — it fails the vertical line test.
How do I know whether to use a bracket or a parenthesis for an endpoint?
Solid dot → bracket, because the endpoint belongs to the domain. Open circle → parenthesis, because it doesn't. For infinity, always use a parenthesis regardless of what the other end does.
Can a linear function's graph ever restrict its domain visibly?
Only when the graph isn't a full line. Rays show one endpoint; segments show two. These arise in piecewise and real-world modeling problems. If the line reaches both grid edges with no dot, the domain is unrestricted.
What's the difference between domain and range on a line?
Domain is the set of x-values, range is the y-values. On a full non-vertical line, both are (−∞, ∞). On a horizontal line, the domain is still (−∞, ∞) but the range is the single y-value.
Does the slope affect the domain?
No. Slope changes how steeply the line rises or falls but never where it's defined left-to-right. A slope of 0.01 and a slope of 100 both give domain (−∞, ∞) on a full line.
Why do I get marked wrong when I write [−3, ∞]?
Because infinity can't be included — it's a direction, not a real number. Every mainstream convention uses a parenthesis beside ∞. Check your textbook's notation guide to confirm.