If A (6, 2) and C (-1, 3) are two opposite vertices of a square, find the equation of its sides

The diagonals are perpendicular and bisect each other, so

AC = -1/7 x + 20/7
These intersect at the midpoint M = (5/2, 5/2), so
BD = 7x - 15
The distance AB = √50 = 5√2
so the sides of ABCD have length 5
so, if D is at (h,k) then we need
√((h-6)^2 + (k-2)^2) = 5
so, since (h,k) lies on BD, that means
√((h-6)^2 + ((7h-15)-2)^2) = 5
h = 2 or 3, so k = -1 or 6
B = (2,-1) and D = (3,6)

To find the equation of the sides of the square, we first need to determine the coordinates of the other two opposite vertices.

Given that A (6, 2) and C (-1, 3) are two opposite vertices, we can observe that the distance between them along the x-axis is 6 - (-1) = 7 units, and the distance along the y-axis is 3 - 2 = 1 unit.

Since a square has equal side lengths, we can use these distances to find the coordinates of the other two opposite vertices.

Starting from point C (-1, 3), if we move 7 units to the right along the x-axis, we reach the point D (6 + 7 = 13, 3). Similarly, if we move 1 unit up from point C (-1, 3) along the y-axis, we reach the point B (-1, 3 + 1 = 4).

Now, we have the coordinates of all four vertices of the square: A (6, 2), B (-1, 4), C (-1, 3), and D (13, 3).

To find the equations of the sides, we can use the point-slope form of a line: y - y1 = m(x - x1), where (x1, y1) is a point on the line and m is the slope of the line.

1. Equation of side AB:
Taking points A (6, 2) and B (-1, 4), the slope of side AB is (4 - 2) / (-1 - 6) = 2 / -7 = -2/7.
Using point-slope form with point A (6, 2):
y - 2 = (-2/7)(x - 6)
Simplifying, we get: y = (-2/7)x + (20/7)

2. Equation of side BC:
Taking points B (-1, 4) and C (-1, 3), the slope of side BC is (3 - 4) / (-1 - (-1)) = -1 / 0. Since the denominator is zero, this implies a vertical line.
The equation of a vertical line passing through x = -1 is simply x = -1.

3. Equation of side CD:
Taking points C (-1, 3) and D (13, 3), the slope of side CD is (3 - 3) / (13 - (-1)) = 0 / 14 = 0.
Using point-slope form with point C (-1, 3):
y - 3 = 0(x - (-1))
Simplifying, we get: y - 3 = 0
which can be written as: y = 3.

4. Equation of side DA:
Taking points D (13, 3) and A (6, 2), the slope of side DA is (2 - 3) / (6 - 13) = -1 / -7 = 1/7.
Using point-slope form with point D (13, 3):
y - 3 = (1/7)(x - 13)
Simplifying, we get: y = (1/7)x - 2/7.

So, the equations of the four sides of the square are:
AB: y = (-2/7)x + (20/7)
BC: x = -1
CD: y = 3
DA: y = (1/7)x - 2/7.