find the equation of the line

0.3,0.4
0.4,0.3
0.1,0.2
0.3,0.1

Two points define a line. Why have you listed four points? They do not lie on the same line.

If x = 0.3, y cannot be both 0.4 and 0.1, unless the line is vertical, and it can't be because the other points have different x values

If you mean fit a line to the points by least squares or something, please say so.

To find the equation of a line given four points, we use the formula for the slope-intercept form of a linear equation: y = mx + b, where m is the slope and b is the y-intercept.

First, let's calculate the slope (m) using the given points. The formula for slope is (y₂ - y₁) / (x₂ - x₁), where (x₁, y₁) and (x₂, y₂) are two points on the line.

Using the first two points (0.3, 0.4) and (0.4, 0.3):
m₁ = (0.3 - 0.4) / (0.4 - 0.3) = -0.1

Using the last two points (0.1, 0.2) and (0.3, 0.1):
m₂ = (0.1 - 0.2) / (0.3 - 0.1) = -0.1

Now, let's find the average slope by adding m₁ and m₂ and dividing by 2:
m = (m₁ + m₂) / 2 = (-0.1 + -0.1) / 2 = -0.2 / 2 = -0.1

Next, we can choose any of the given points to substitute into the equation y = mx + b. Let's choose point (0.3, 0.4):

0.4 = -0.1(0.3) + b
0.4 = -0.03 + b
b = 0.4 + 0.03
b = 0.43

Now we have the slope (m = -0.1) and the y-intercept (b = 0.43). Therefore, the equation of the line is:
y = -0.1x + 0.43