Algebra I Unit 2: Writing Linear Equations & Functions
This Algebra I unit, Writing Linear Equations & Functions, has 7 lessons that cover TEKS A.2A, A.2B, A.2C, A.2D, A.2E, A.2F, A.2G, A.2H and more. Each lesson below gives the goal, key vocabulary, a worked example and practice questions with answers you can check.
Practice this unit with interactive questions
STAAR connection: Algebra I is a subject tested by the State of Texas Assessments of Academic Readiness (STAAR). Texas lawmakers have voted to replace STAAR with shorter tests beginning in the 2027–28 school year; the tests are still built on the TEKS, so practicing the TEKS stays useful.
TEKS covered in this unit
- A.2A determine the domain and range of a linear function in mathematical problems; determine reasonable domain and range values for real-world situations, both continuous and discrete; and represent domain and range using inequalities
- A.2B write linear equations in two variables in various forms, including y = mx + b, Ax + By = C, and y – y1 = m(x – x1), given one point and the slope and given two points
- A.2C write linear equations in two variables given a table of values, a graph, and a verbal description
- A.2D write and solve equations involving direct variation
- A.2E write the equation of a line that contains a given point and is parallel to a given line
- A.2F write the equation of a line that contains a given point and is perpendicular to a given line
- A.2G write an equation of a line that is parallel or perpendicular to the X or Y axis and determine whether the slope of the line is zero or undefined
- A.2H write linear inequalities in two variables given a table of values, a graph, and a verbal description
- A.2I write systems of two linear equations given a table of values, a graph, and a verbal description
Lesson 1: Domain and range of linear functions
TEKS A.2A
What you will learn
I can find the domain and range of a linear function, choose reasonable values for real-world situations (discrete or continuous), and write them with inequalities.
I can explain domain, range and discrete / continuous using inequality notation.
Key vocabulary
- domain
- The set of all possible input values (x-values) of a function.
Examples: 0 ≤ x ≤ 6 tickets; All real numbers for y = 2x − 1 - range
- The set of all possible output values (y-values) of a function.
Examples: 4 ≤ y ≤ 19 dollars; {5, 8, 11, 14, 17} - discrete and continuous data
- Discrete data are separate, countable values (points). Continuous data can take every value in an interval (a connected line).
Examples: Discrete: number of tickets; Continuous: gallons of water
Worked example
A theater charges a $4 booking fee plus $2.50 per ticket, and you can buy at most 6 tickets. Write the function, then give the domain and range.
- Let x = tickets and y = total cost: y = 2.5x + 4.
Rate $2.50 per ticket and start $4. - Domain: you cannot buy part of a ticket, so x is a whole number with 0 ≤ x ≤ 6.
This is discrete data. - Range: substitute the smallest and largest x. y(0) = 4 and y(6) = 19.
A line increases, so outputs run from the first to the last. - Range: 4 ≤ y ≤ 19, with only the values 4, 6.5, 9, 11.5, 14, 16.5, 19.
Only 7 outputs are possible because the data are discrete.
Strategy: Limit, Plug, Write
- Limit the input: what values of x make sense?
- Plug the smallest and largest x into the function.
- Write both sets with inequalities (or a list if discrete).
Check your understanding
A pizza order costs C = 3n + 5, where n is the number of pizzas and 0 to 4 pizzas can be ordered. What is the domain?
- n ≥ 0
- 5 ≤ n ≤ 17
- all real numbers
- n = 0, 1, 2, 3, 4 (0 ≤ n ≤ 4, whole numbers)
Show the answer
Answer: D. n = 0, 1, 2, 3, 4 (0 ≤ n ≤ 4, whole numbers)
You cannot order part of a pizza, so the inputs are the whole numbers 0 through 4.
For C = 3n + 5 with n = 0, 1, 2, 3, 4, what is the range?
- C ≥ 5
- 0 ≤ C ≤ 17 (every value)
- {0, 1, 2, 3, 4}
- {5, 8, 11, 14, 17}
Show the answer
Answer: D. {5, 8, 11, 14, 17}
3(0)+5 = 5, 8, 11, 14, 17. Only these five outputs are possible.
A tank holds 12 gallons and the fuel left is f = 12 − 0.04m after driving m miles, until the tank is empty. Which is the correct domain and range (continuous)?
- Domain m ≥ 0; range f ≥ 0
- Domain 0 ≤ m ≤ 12; range 0 ≤ f ≤ 300
- Domain 0 ≤ m ≤ 300; range 0 ≤ f ≤ 12
- Domain all real numbers; range all real numbers
Show the answer
Answer: C. Domain 0 ≤ m ≤ 300; range 0 ≤ f ≤ 12
f = 0 when m = 12 ÷ 0.04 = 300. So 0 ≤ m ≤ 300 and the fuel runs from 12 down to 0.
Lesson 2: Writing equations: slope-intercept, standard and point-slope
TEKS A.2B
What you will learn
I can write the equation of a line in slope-intercept form, point-slope form and standard form, given a point and the slope or given two points.
I can explain the parts of y = mx + b, y − y₁ = m(x − x₁) and Ax + By = C.
Key vocabulary
- slope-intercept form
- y = mx + b, where m is the slope and b is the y-intercept.
Examples: y = 3x − 2; y = −½x + 4 - point-slope form
- y − y₁ = m(x − x₁), written from the slope m and any point (x₁, y₁) on the line.
Examples: y − 5 = 2(x − 1); y + 2 = −3(x − 4) - standard form
- Ax + By = C, where A, B and C are integers and A is not negative.
Examples: 2x + 3y = 12; x − y = 5
Worked example
Write the equation of the line through (1, 5) and (3, 11) in point-slope, slope-intercept and standard forms.
- Slope: m = (11 − 5) ÷ (3 − 1) = 6 ÷ 2 = 3.
Rise over run between the two points. - Point-slope with (1, 5): y − 5 = 3(x − 1).
Substitute m, x₁ and y₁. - Distribute and solve for y: y − 5 = 3x − 3, so y = 3x + 2.
The y-intercept is 2. - Standard form: subtract 3x from both sides: −3x + y = 2, then multiply by −1: 3x − y = −2.
Keep A positive. Check (3, 11): 9 − 11 = −2 ✓.
Strategy: Slope, Point, Convert
- Find m (from two points if needed).
- Use a point in y − y₁ = m(x − x₁).
- Convert to the form requested and check with the other point.
Check your understanding
Which equation is in point-slope form for the line with slope 4 through (2, −3)?
- y − 2 = 4(x + 3)
- y + 3 = 4(x + 2)
- y − 3 = 4(x + 2)
- y + 3 = 4(x − 2)
Show the answer
Answer: D. y + 3 = 4(x − 2)
With y₁ = −3, y − (−3) = y + 3, and x − 2. So y + 3 = 4(x − 2).
Write y = 3x − 5 in standard form (Ax + By = C with A ≥ 0).
- x − 3y = 5
- 3x + y = 5
- −3x + y = −5
- 3x − y = 5
Show the answer
Answer: D. 3x − y = 5
Subtract 3x: −3x + y = −5. Multiply by −1: 3x − y = 5.
A line passes through (0, 4) with slope −2. What is its equation in slope-intercept form?
- y = 4x − 2
- y = −2x + 4
- y = −2x − 4
- y = 2x + 4
Show the answer
Answer: B. y = −2x + 4
b = 4 and m = −2, so y = −2x + 4.
Lesson 3: Equations from tables, graphs and words
TEKS A.2C
What you will learn
I can write a linear equation from a table of values, a graph, or a verbal description.
I can describe how to find the rate of change and the initial value in each representation.
Key vocabulary
- rate of change
- How much y changes for each 1-unit change in x; in a line it is the slope m.
Examples: $2.50 per ticket; A table where y goes up 3 each time x goes up 1 - initial value
- The value of y when x = 0, the y-intercept b.
Examples: A $4 booking fee; A plant 10 cm tall at the start - linear function
- A function whose graph is a line; it has a constant rate of change.
Examples: y = 2x + 1; x: 0, 1, 2 and y: 4, 7, 10
Worked example
A table shows x: 0, 1, 2, 3 and y: 5, 8, 11, 14. A gym charges a joining fee plus a monthly fee. Write the equation.
- y increases by 3 each time x increases by 1, so m = 3.
Constant steps means linear. - When x = 0, y = 5, so b = 5.
The initial value is in the table. - Write y = 3x + 5.
Slope-intercept form. - Check x = 3: 3(3) + 5 = 14 ✓.
Always test a different row.
Strategy: Rate, Start, Write, Check
- Rate: find the constant change in y per 1 in x.
- Start: find y when x = 0 (work backward if needed).
- Write y = mx + b and check another point.
Check your understanding
A table shows x: 0, 1, 2, 3 and y: 7, 10, 13, 16. What is the equation?
- y = x + 7
- y = 3x + 10
- y = 7x + 3
- y = 3x + 7
Show the answer
Answer: D. y = 3x + 7
y rises 3 per 1 in x and y(0) = 7, so y = 3x + 7.
A line crosses the y-axis at (0, −2) and passes through (3, 4). What is its equation?
- y = 3x − 2
- y = 2x + 2
- y = 2x − 2
- y = ½x − 2
Show the answer
Answer: C. y = 2x − 2
b = −2 and m = (4 − (−2)) ÷ 3 = 2. So y = 2x − 2.
A plumber charges $40 to come to the house plus $55 per hour. Which equation gives the total cost y for x hours?
- y = 40x + 55
- y = 55x + 40
- y = 55x − 40
- y = 95x
Show the answer
Answer: B. y = 55x + 40
The per-hour charge is the slope (55) and the one-time fee is the y-intercept (40).
Lesson 4: Direct variation
TEKS A.2D
What you will learn
I can write and solve equations involving direct variation, y = kx.
I can explain varies directly and the constant of variation k.
Key vocabulary
- direct variation
- A relationship y = kx in which y changes at a constant multiple of x; the graph is a line through the origin.
Examples: y = 4x; Wages: $15 per hour - constant of variation
- The constant k in y = kx, equal to y ÷ x and to the slope.
Examples: k = 15 in y = 15x; k = ½ in y = ½x - proportional relationship
- Two quantities whose ratio y ÷ x is always the same.
Examples: Gallons and cost at a fixed price; Distance at constant speed
Worked example
y varies directly with x and y = 24 when x = 6. Write the equation, then find y when x = 11.
- k = y ÷ x = 24 ÷ 6 = 4.
The constant of variation. - Equation: y = 4x.
Substitute k into y = kx. - Find y when x = 11: y = 4(11) = 44.
Substitute the new x. - Check by proportion: 24/6 = 44/11 = 4 ✓.
Both ratios must equal k.
Strategy: k, Equation, Solve
- Find k = y ÷ x from the known pair.
- Write y = kx.
- Solve for the missing value and check the ratio.
Check your understanding
y varies directly with x and y = 35 when x = 7. What is the constant of variation?
- 0.2
- 245
- 28
- 5
Show the answer
Answer: D. 5
k = 35 ÷ 7 = 5, so y = 5x.
If y varies directly with x and y = 18 when x = 3, what is y when x = 8?
- 24
- 54
- 48
- 26
Show the answer
Answer: C. 48
k = 18 ÷ 3 = 6, so y = 6(8) = 48.
Which equation represents direct variation?
- y = 2x + 1
- y = −2.5x
- y = 10 − x
- y = x²
Show the answer
Answer: B. y = −2.5x
Only y = −2.5x has the form y = kx (k = −2.5).
Lesson 5: Parallel, perpendicular, horizontal and vertical lines
TEKS A.2E A.2F A.2G
What you will learn
I can write the equation of a line through a given point that is parallel or perpendicular to a given line, and write equations of horizontal and vertical lines (slope 0 or undefined).
I can use parallel, perpendicular, negative reciprocal and undefined slope to justify an equation.
Key vocabulary
- parallel lines
- Lines in the same plane that never meet; they have the same slope and different y-intercepts.
Examples: y = 2x + 1 and y = 2x − 5; x = 1 and x = 4 - perpendicular lines
- Lines that meet at a right angle; their slopes are negative reciprocals (product −1).
Examples: y = 2x and y = −½x; y = 3x and y = −⅓x - horizontal and vertical lines
- A horizontal line y = c has slope 0; a vertical line x = c has an undefined slope.
Examples: y = 4 (slope 0); x = −2 (slope undefined)
Worked example
Write the equation of the line through (4, 1) that is (a) parallel and (b) perpendicular to y = 2x + 3.
- Given slope m = 2.
Read it from slope-intercept form. - (a) Parallel: same slope 2. y − 1 = 2(x − 4), so y = 2x − 7.
Use point-slope with (4, 1). - (b) Perpendicular: negative reciprocal of 2 is −½. y − 1 = −½(x − 4), so y = −½x + 3.
Check: 2 · (−½) = −1 ✓. - Check both pass through (4, 1): 2(4) − 7 = 1 ✓ and −½(4) + 3 = 1 ✓.
Always test the given point.
Strategy: Slope Rule, Point, Check
- Parallel keeps m; perpendicular uses the negative reciprocal.
- Use point-slope with the given point.
- Check the point and (for perpendicular) that m₁m₂ = −1.
Check your understanding
What is the equation of the line through (0, 6) parallel to y = −3x + 1?
- y = −3x + 1
- y = −⅓x + 6
- y = 3x + 6
- y = −3x + 6
Show the answer
Answer: D. y = −3x + 6
The slope is −3 and (0, 6) gives b = 6.
Which slope is perpendicular to a line with slope 4/5?
- 5/4
- 4/5
- −5/4
- −4/5
Show the answer
Answer: C. −5/4
The negative reciprocal of 4/5 is −5/4 (product −1).
Write the equation of the line through (6, −2) that is perpendicular to y = 3x − 1.
- y = −⅓x
- y = −⅓x − 4
- y = −3x + 16
- y = 3x − 20
Show the answer
Answer: A. y = −⅓x
m = −⅓. y + 2 = −⅓(x − 6) = −⅓x + 2, so y = −⅓x.
Lesson 6: Writing linear inequalities
TEKS A.2H
What you will learn
I can write a linear inequality in two variables from a table of values, a graph, or a verbal description.
I can use boundary line, solid / dashed and the words at least, at most, more than, fewer than to write an inequality.
Key vocabulary
- linear inequality
- A statement like y > 2x + 1 or 3x + 2y ≤ 12 comparing two linear expressions; its solutions form a region of the plane.
Examples: y ≥ x − 3; 2x + y < 8 - boundary line
- The line obtained by replacing the inequality sign with =; it separates solutions from non-solutions.
Examples: y = 2x + 1 for y > 2x + 1; x + y = 5 for x + y ≤ 5 - solution set
- All ordered pairs that make the inequality true.
Examples: (0, 5) for y > 2x + 1; (2, 2) for x + y ≤ 5
Worked example
You have $60 to spend on notebooks at $3 each (x) and pens at $2 each (y). Write an inequality for what you can buy.
- Total spent = 3x + 2y.
Cost per item times the number of items. - "Spend at most $60" means ≤.
"At most" includes the endpoint: ≤. - Inequality: 3x + 2y ≤ 60.
The boundary line is solid because 60 is allowed. - Check (10, 10): 30 + 20 = 50 ≤ 60 ✓. Check (20, 10): 60 + 20 = 80 ✗.
Test points to confirm the correct inequality.
Strategy: Words → Symbol, Boundary, Test
- Translate the words to <, >, ≤ or ≥.
- Write the boundary line as an equation.
- Test a point inside and outside.
Check your understanding
Which inequality means "the total cost y is at least $15 plus $4 for each x"?
- y ≥ 15x + 4
- y > 4x + 15
- y ≤ 4x + 15
- y ≥ 4x + 15
Show the answer
Answer: D. y ≥ 4x + 15
"At least" means ≥, the rate is 4 per x and the start is 15.
A graph shows a dashed boundary y = 2x − 1 with the region above it shaded. Which inequality is shown?
- y ≥ 2x − 1
- y > 2x − 1
- y > −x + 2
- y < 2x − 1
Show the answer
Answer: B. y > 2x − 1
Dashed means strict (> or <), and above means greater than.
Which ordered pair is a solution of 3x + 2y ≤ 12?
- (2, 3)
- (6, 0)
- (5, 1)
- (4, 3)
Show the answer
Answer: A. (2, 3)
3(2) + 2(3) = 12 ≤ 12 ✓. The others give 18, 17 and 18.
Lesson 7: Writing systems of linear equations
TEKS A.2I
What you will learn
I can write a system of two linear equations from a table of values, a graph, or a verbal description.
I can define variables and use system, solution and intersection to write two equations.
Key vocabulary
- system of linear equations
- Two or more linear equations that use the same variables and are solved together.
Examples: y = 2x + 1 and y = −x + 7; x + y = 10 and x − y = 2 - solution of a system
- The ordered pair that makes both equations true; the point where the graphs cross.
Examples: (2, 5) for y = 2x + 1 and y = −x + 7; The point where two lines cross - define variables
- Say exactly what each letter stands for, with units, before writing equations.
Examples: x = hours, y = total cost; a = adult tickets, c = child tickets
Worked example
Gym A charges $20 to join plus $10 per month. Gym B charges $50 to join plus $5 per month. Write a system for the total cost y after x months.
- Define: x = months, y = total cost in dollars.
Units make the equations meaningful. - Gym A: the start is 20 and the rate is 10: y = 10x + 20.
m is the monthly rate and b is the joining fee. - Gym B: y = 5x + 50.
Same form, different values. - The system is y = 10x + 20 and y = 5x + 50. Check x = 6: 80 and 80, so they cost the same after 6 months.
The intersection is (6, 80).
Strategy: Define, Rate & Start, Two Equations
- Define x and y with units.
- For each situation find the rate and the start.
- Write both equations in the same form.
Check your understanding
Two plans: Plan A is $15 plus $2 per visit; Plan B is $5 plus $4 per visit. Which system gives the cost y after x visits?
- y = 2x + 15 and y = 5x + 4
- y = 15x + 2 and y = 5x + 4
- y = 2x + 15 and y = 4x + 5
- y = 2x − 15 and y = 4x − 5
Show the answer
Answer: C. y = 2x + 15 and y = 4x + 5
Each plan is y = (per visit)x + (starting fee).
A line passes through (0, 2) and (3, 8), and another passes through (0, 10) and (5, 0). Which system describes them?
- y = 2x + 2 and y = 2x + 10
- y = 2x + 2 and y = −2x + 10
- y = 2x + 8 and y = −2x
- y = 3x + 2 and y = −5x + 10
Show the answer
Answer: B. y = 2x + 2 and y = −2x + 10
First: m = 2, b = 2. Second: m = −10/5 = −2, b = 10.
Adult tickets cost $8 and child tickets cost $5. 20 tickets were sold for $130. Let a = adult and c = child. Which system is correct?
- a + c = 20 and 8a + 5c = 130
- 8a + 5c = 20 and a + c = 130
- a + c = 20 and 5a + 8c = 130
- a + c = 130 and 8a + 5c = 20
Show the answer
Answer: A. a + c = 20 and 8a + 5c = 130
The counts add to 20 and the dollars add to 130.