Equations of quadrilaterals
Primarily, a quadrilateral may be represented by the combined equation of its four sides. For example, the equation of a quadrilateral having sides : 𝑦 = 𝑚1 𝑥 + 𝑐1 𝑦 = 𝑚2 𝑥 + 𝑐2 𝑦 = 𝑚3 𝑥 + 𝑐3 𝑦 = 𝑚4 𝑥 + 𝑐4 can be represented as : 𝑚1 𝑥 + 𝑐1 − 𝑦 𝑚2 𝑥 + 𝑐2 − 𝑦 𝑚3 𝑥 + 𝑐3 − 𝑦 𝑚4 𝑥 + 𝑐4 − 𝑦 = 0 However, a serious drawback of this equation is that along with the points on the sides of the quadrilateral, this equation is also satisfied for all other points lying on the four straight lines that represent the sides of the quadrilateral and so, its graph looks like as follows : 𝑌
𝑋
´
(0,0) 𝑋 𝑌
´ Fig. 1: Four straight lines form a rectangle In this text, the modulus or absolute function (defined for real numbers) has been used in deducing equations of a quadrilateral. Subsequently, each of the graphs, obtained from these equations has four non differentiable points, which are the four vertices of a quadrilateral.
The greatest integer function could also have been used to fix the problem. For example, including this function, the equation of a square having vertices at (0,0), (0,1), (1,1) & (1,0) would look like : 𝑃 1 − 𝑃 = 𝑥𝑦 1 − 𝑥 1 − 𝑦 … … … (𝑎)  where 𝑃 = 𝑥 − 1 − 𝑥 ( 𝑦 − 1 − 𝑦 ) , […] denoting the greatest integer function (see figure aside). However, this method is not handy for mathematical treatment, and this equation cannot be easily generalized for any kind of quadrilateral. So, I shall make no further discussion on this equation. (Note that in this equation, the use of the modulus function was also required.) 𝑌
(0,1) (1,1) 𝑋
´
(0,0)
(1,0) 𝑋 𝑌
´
Fig : Square obtained from equation a
Equations
of
quadrilaterals

1
Equation of square whose diagonals coincide with 𝑋 and 𝑌 axes
Consider the following equation : It gives the following result.
Case 1: x>0, y>0 Case 2: x>0, y<0 Case 3: x<0, y>0 Case 4: x<0, y<0
𝑥
+ 𝑦 = 𝑐 𝑥 + 𝑦 = 𝑐 𝑥 − 𝑦 = 𝑐 −𝑥 + 𝑦 = 𝑐 −𝑥 − 𝑦 = 𝑐
[c is a constant]
So, its graph looks like as follows : 𝑌
(0,c) 𝑋
´
(c,0)
(0,0)
(c,0) 𝑋
(0,c) 𝑌
´ Fig. 2: Representation of equation (𝑖 ) It is a square having its two opposite vertices on 𝑋 axis and the other two on 𝑌 axis. Also, it can be found that 𝑐 = 𝑑 2 = 𝑎 2, where 𝑑 and 𝑎 are the lengths of a diagonal and a side of the square respectively. So, an equation of a square whose diagonals are axially aligned and the geometric centre is at origin, can be now suggested : 𝑥 + 𝑦 = 𝑑 𝑎 = … … … … (𝑖) 2 2
In the entire text, the term Geometric Centre or GC has been used to indicate the point of intersection of two diagonals of a quadrilateral.
Extension for any kind of square
Let the geometric centre of the square be located at the point (𝑥𝐺𝐶 , 𝑦𝐺𝐶 ) instead of origin. In that case, we can replace 𝑥 and 𝑦 in equation (𝑖) by (𝑥 − 𝑥𝐺𝐶 ) 𝑎nd (𝑦 − 𝑦𝐺𝐶 ). Also, the square may be rotated from its original axially aligned position. So, after shifting it to the new position, it will also need to be rotated properly. Considering all these situations, the most general equation of a square will be : 𝑥 − 𝑥𝐺𝐶 cos 𝛼 + 𝑦 − 𝑦𝐺𝐶 sin 𝛼 + − 𝑥 − 𝑥𝐺𝐶 sin 𝛼 + 𝑦 − 𝑦𝐺𝐶 cos 𝛼 =  Where, 𝛼 is the necessary rotation of the coordinate axes (Fig. 3). 𝑑 𝑎 = … … … … 𝑖𝑖 2 2
Equations
of
quadrilaterals

2 𝑌
[𝑃 ≡ 𝑥𝐺𝐶 , 𝑦𝐺𝐶 ] 𝑃 𝑋
´ 𝛼
(0,0) 𝑋 𝑌
´ Fig. 3: Representation of equation (𝑖𝑖 )
Special Case : 𝜶 = 𝝅 𝟒
When 𝛼 takes the value 𝜋 4, (Fig. 4) the equation (ii) becomes : 𝑥 − 𝑥𝐺𝐶 + 𝑦 − 𝑦𝐺𝐶 𝑑 = = 𝑎 2 + − 𝑥 − 𝑥𝐺𝐶 + 𝑦 − 𝑦𝐺𝐶 … … … … 𝑖𝑖𝑖 𝑎
𝜋
4
𝑌
[𝑃 ≡ 𝑥𝐺𝐶 , 𝑦𝐺𝐶 ] 𝑃
It is the equation of a square, whose sides are parallel to the coordinate axes. In particular, when 𝐺𝐶 becomes the origin, then the equation (iii)𝑎 becomes : 𝑥 + 𝑦 + −𝑥 + 𝑦 = 𝑑 2 = 𝑎 … … … … 𝑖𝑖𝑖 𝑏 𝑋
´ 𝛼
=
(0,0)
𝑋
𝑌
´
Fig. 4
Equation of any quadrilateral having axially aligned diagonals
The sides of the quadrilateral, shown in Fig. 5, having arbitrary slopes cannot be represented by the moduluscontrolled equation (i). In this case, we need to introduce a variable quantity, outside the modulus brackets. Now, consider the following equation : 𝑋´ 𝐴 𝑥 + 𝐵𝑥 + 𝐶 𝑦 + 𝐷𝑦 = 1 This equation reduces as follows :
1 quadrant: 2nd quadrant: rd 3 quadrant: th 4 quadrant:
st
𝑌
(0,a) (d,0) (0,0) (0,c) (b,0) 𝑋 𝐵
+ 𝐴 𝑥 + 𝐵 − 𝐴 𝑥 + 𝐵 − 𝐴 𝑥 + 𝐵 + 𝐴 𝑥 + 𝐷
+ 𝐶 𝑦 = 1 𝐷 + 𝐶 𝑦 = 1 𝐷 − 𝐶 𝑦 = 1 𝐷 − 𝐶 𝑦 = 1
Fig. 5 𝑌
´
 These also result a quadrilateral.
Equations
of
quadrilaterals

3
Now, the set of equations for the sides of the quadrilateral in Fig. 5 is : 𝑥 𝑏 + 𝑦 𝑎 = 1 … … … … 𝑓𝑜𝑟 𝑞𝑢𝑎𝑑𝑟𝑎𝑛𝑡 𝐼 𝑥 𝑑 + 𝑦 𝑎 = 1 … … … … 𝑓𝑜𝑟 𝑞𝑢𝑎𝑑𝑟𝑎𝑛𝑡 𝐼𝐼 𝑥 𝑑 + 𝑦 𝑐 = 1 … … … … 𝑓𝑜𝑟 𝑞𝑢𝑎𝑑𝑟𝑎𝑛𝑡 𝐼𝐼𝐼 𝑥 𝑏 + 𝑦 𝑐 = 1 … … … … 𝑓𝑜𝑟 𝑞𝑢𝑎𝑑𝑟𝑎𝑛𝑡 𝐼𝑉 Comparing this set of equations with the previous one, we get : 1 𝑎 = 𝐷 + 𝐶 1 𝑏 = 𝐵 + 𝐴 1 𝑐 = 𝐷 − 𝐶 1 𝑑 = (𝐵 − 𝐴) From the above relations, it is clear that – (𝑑 − 𝑏) (𝑑 + 𝑏) (𝑐 − 𝑎) (𝑐 + 𝑎) 𝐴 = , 𝐵 = , 𝐶 = , 𝐷 = 2𝑑𝑏 2𝑑𝑏 2𝑐𝑎 2𝑐𝑎 Now the quadrilateral in Fig. 5 can be represented as : 𝑑 − 𝑏 𝑥 + 𝑑 + 𝑏 𝑥 𝑐 − 𝑎 𝑦 + 𝑐 + 𝑎 𝑦 + =1 2𝑑𝑏 2𝑐𝑎 … … … … (𝑖𝑣)
Any quadrilateral having mutually perpendicular diagonals
Equation (iv) can be generalized, just as the square equation. Thus, the equation of the quadrilateral shown in Fig. 6, and hence for any quadrilateral having mutually perpendicular diagonals will be :
′ ′ ′ ′ ′ ′ ′ ′ 𝑥4 − 𝑥2 𝑋 + 𝑥4 + 𝑥2 𝑋 𝑦3 − 𝑦1 𝑌 + 𝑦3 + 𝑦1 𝑌 + = 1 … … (𝑖𝑣) ′ ′ ′ ′ 2 𝑥4 𝑥2 2 𝑦3 𝑦1
𝑌
(𝑥1 , 𝑦1 )
[𝑃 ≡ 𝑥𝐺𝐶 , 𝑦𝐺𝐶 ]
(𝑥2 , 𝑦2 )
P
(𝑥4 , 𝑦4 )
(𝑥3 , 𝑦3 )
Here, 𝑋
´ i) ii) iii) iv) 𝑋 = 𝑥 − 𝑥𝐺𝐶 cos 𝛼 + 𝑦 − 𝑦𝐺𝐶 sin 𝛼 𝑌 = − 𝑥 − 𝑥𝐺𝐶 sin 𝛼 + 𝑦 − 𝑦𝐺𝐶 cos 𝛼 𝑥𝑖′ = 𝑥𝑖 − 𝑥𝐺𝐶 cos 𝛼 + 𝑦𝑖 − 𝑦𝐺𝐶 sin 𝛼 𝑖 = 1,2,3,4 𝑦𝑖′ = − 𝑥𝑖 − 𝑥𝐺𝐶 sin 𝛼 + 𝑦𝑖 − 𝑦𝐺𝐶 cos 𝛼
(0,0) 𝛼
𝑋
Fig. 6
𝑌
´
Non  perpendicular  diagonal cases
Till now, only the cases, where the two diagonals of a quadrilateral were mutually perpendicular, have been considered. Quadrilaterals with nonperpendicular diagonals may be handled as follow :
New set of coordinate axes
(𝑥1 , 𝑦1 ) 𝑥𝐺𝐶 , 𝑦𝐺𝐶 (𝑥2 , 𝑦2 ) (𝑥4 , 𝑦4 ) (0,0) [old] (𝑥3 , 𝑦3 ) [old]
Step 1 : The origin is shifted to the point 𝑥𝐺𝐶 , 𝑦𝐺𝐶 .
Fig. 7a
Equations
of
quadrilaterals

4
Step 2 : Let, the angles the diagonals make with the positive 𝑋 axis be ∅ and 𝛽 ( 𝛽 > ∅ ). Now the axis is rotated by an angle 𝛾, so that the angular bisector of the angle (𝜋 − 𝛽 + ∅) coincide with 𝑋 axis (Fig. 7b). [ 𝜋 − 𝛽 + ∅ is the angle, containing ∅, made by the diagonals.] 𝛽
∅
𝜋
− 𝛽 + ∅
𝛾
Fig. 7b
Step 3 : Now, the scale of the 𝑋 axis is modified by multiplying the 𝑥 coordinates with a factor 𝑝, such that in the new scale, the diagonals become mutually perpendicular. From Fig. 7c, it is clear that, tan 𝜃 = 𝑝𝑙 𝑙 = 𝑝. Now, a point (𝑥 ′ , 𝑦 ′ ) in the new coordinate system would take the following form, when represented by (𝑥, 𝑦) belonging to the old system : 𝑥 ′ = 𝑝[ 𝑥 − 𝑥𝐺𝐶 cos 𝛾 + 𝑦 − 𝑦𝐺𝐶 sin 𝛾 ] 𝑦 ′ = − 𝑥 − 𝑥𝐺𝐶 sin 𝛾 + 𝑦 − 𝑦𝐺𝐶 cos 𝛾 This point (𝑥 ′ , 𝑦 ′ ) satisfies equation (iv) with 𝛼 = 𝜋 4.
′ ′ (𝑥1 , 𝑦1 )
𝜃
=
𝑙
′ ′ (𝑥2 , 𝑦2 ) 𝜃
′ ′ (𝑥4 , 𝑦4 )
𝜋
−𝛽+∅ 2 𝑝𝑙 𝑝𝑙
′ ′ (𝑥3 , 𝑦3 )
Fig. 7c
So, the equation of a quadrilateral with nonperpendicular diagonals will be : 𝑋4 − 𝑋2 𝑋 + 𝑋4 + 𝑋2 𝑋 𝑌3 − 𝑌1 𝑌 + 𝑌3 + 𝑌1 𝑌 + = 1 … … … (𝑣) 2 𝑋4 𝑋2 2 𝑌3 𝑌1 Where, i) ii) iii) iv) v) vi) 𝑋 = (𝑥 ′ + 𝑦 ′ ) 𝑌 = (−𝑥 ′ + 𝑦 ′ ) 𝑋𝑖 = (𝑥𝑖′ + 𝑦𝑖′ ) 𝑌𝑖 = (−𝑥𝑖′ + 𝑦𝑖′ ) 𝑥𝑖′ = 𝑝[ 𝑥𝑖 − 𝑥𝐺𝐶 cos 𝛾 + 𝑦𝑖 − 𝑦𝐺𝐶 sin 𝛾] 𝑦𝑖′ = − 𝑥𝑖 − 𝑥𝐺𝐶 sin 𝛾 + 𝑦𝑖 − 𝑦𝐺𝐶 cos 𝛾 𝑖
= 1,2,3,4
At the end, It must be mentioned that all the equations discussed so far, will work only in case of convex quadrilaterals, i.e. when the GC of the quadrilateral will lie inside it. But in case of concave quadrilaterals, where GC lies outside the quadrilateral, (e.g. Fig. 8) all the equations fail. 𝑌 𝐺𝐶 𝑋
´
(0,0) 𝑋
Fig. 8 : Concave quadrilateral 𝑌
´
Equations
of
quadrilaterals

5