Explanation:
x = number of rows
y = number of seats per row
xy = 246
x = y - 6
we can use the identity of the serving equation in the first, and we get
(y - 6)y = 246
y² - 6y - 246 = 0
to solve such a quadratic equation the general formula is
y = (-b ± sqrt(b² - 4ac))/(2a)
in our case
a = 1
b = -6
c = -246
y = (6 ± sqrt(36 - 4×1×-246))/2 = (6 ± sqrt(36 + 984))/2 =
= (6 ± sqrt(1020))/2
now, I see a problem for that particular scenario, because 1020 is not a square number, and we get solutions that are not whole numbers. and that does not make any sense here.
there should be whole number solution for the number of seats and rows.
I think therefore there is a mistake in the specified numbers.
if the theater would seat e.g. 247 people (instead of 246), then it would all work out perfectly.
therefore, I am changing the last solution approach accordingly :
in our case
a = 1
b = -6
c = -247
y = (6 ± sqrt(36 - 4×1×-247))/2 = (6 ± sqrt(36 + 988))/2 =
= (6 ± sqrt(1024))/2 = (6 ± 32)/2
y1 = (6 + 32)/2 = 38/2 = 19
y2 = (6 - 32)/2 = -26/2 = -13
a negative number for the number of seats did not make any sense, so,
y = 19 is the valid solution.
out of the first equation we get then
x × 19 = 247
x = 247/19 = 13
so, the theater has 13 rows (with 19 seats in each row).