The length of a spring is a linear function of the mass of the object hanging from it. For a particular spring, the length was 12 centimeters when a 2-kg mass was attached to it. When a 5-kg mass was hung from it, it stretched to a length of 18 cm. Which equation relates the length of this spring, y, to the number of kilograms hung from it, x?

if the length y is a function of the mass, x, then

y = ax+b

2a+b = 12
5a+b = 18
subtract 1st from 2nd to get
3a = 6
a = 2

2*2+b=12, so b=8

y = 2x+8

To find the equation relating the length of the spring, y, to the mass hung from it, x, we need to determine the equation of the line that passes through the two given points.

Given:
Point 1: (2 kg, 12 cm)
Point 2: (5 kg, 18 cm)

Since the relationship between the length of the spring and the mass is stated to be linear, we can use the slope-intercept form of a linear equation: y = mx + b.

To find the slope, m, we can use the formula:
m = (y2 - y1) / (x2 - x1)

By substituting the values from the given points into the formula, we get:
m = (18 cm - 12 cm) / (5 kg - 2 kg)
m = 6 cm / 3 kg
m = 2 cm/kg

The slope of this linear equation is 2 cm/kg.

Next, we can use the slope-intercept form of a linear equation and substitute one of the given points to find the value of the y-intercept, b.

Using Point 1 (2 kg, 12 cm) and the slope m = 2 cm/kg:
y = mx + b
12 cm = 2 cm/kg * 2 kg + b
12 cm = 4 cm + b
b = 12 cm - 4 cm
b = 8 cm

Therefore, the y-intercept of this linear equation is 8 cm.

Finally, we can combine the slope and the y-intercept to form the equation relating the length of the spring, y, to the mass hung from it, x:
y = 2x + 8

So, the equation that relates the length of the spring, y, to the number of kilograms hung from it, x is y = 2x + 8.