An electrician charges $120 after 2 hours of work and $190after 4 hours of work .write a linear model that represents the total cost as a function of the number of hours worked

To write a linear model that represents the total cost as a function of the number of hours worked, we can use the slope-intercept form of a linear equation: y = mx + b.

Let's break down the given information:
- After 2 hours of work, the electrician charges $120.
- After 4 hours of work, the electrician charges $190.

Let's assign the number of hours worked as x and the total cost as y. So, we have two points on the line: (2, 120) and (4, 190).

Step 1: Determine the slope (m):
The slope (m) represents the rate of change, which is the change in y divided by the change in x. We can calculate it using the formula:
m = (y2 - y1) / (x2 - x1)

Substituting the values:
m = (190 - 120) / (4 - 2)
m = 70 / 2
m = 35

Step 2: Determine the y-intercept (b):
The y-intercept (b) is the value of y when x = 0. To find it, we can use the equation:
y = mx + b, and substitute one of the points.

Let's use the point (2, 120) to find b:
120 = 35(2) + b
120 = 70 + b
b = 120 - 70
b = 50

Step 3: Write the linear model:
Now that we have m = 35 and b = 50, we can write the linear model:
y = 35x + 50

Therefore, the linear model that represents the total cost as a function of the number of hours worked is y = 35x + 50.