Line (2D), Plane (3D) and Hyperplane (nD)

Prince Priyadarshi
2 min readSep 16, 2021

--

LINE

It is actually difficult to give a good mathematical definition. Roughly, an infinitely long collection of points extending in two opposite directions. When we draw lines in geometry, we use an arrow at each end to show that it extends infinitely.

Line Segment

A line segment has two endpoints. It contains these endpoints and all the points of the line between them. You can measure the length of a segment, but not of a line.

Ray

A ray is a part of a line that has one endpoint and goes on infinitely in only one direction. You cannot measure the length of a ray.

Actually, before reading about “Lines” you should be clear about line, ray, and segment differences. So, We come to the point Line(2D),Plane(3D),Hyperplane(nD).

Line (2D)

As we are studying from our Highschool about line and derivation of line. y=mx+C where Y and X are the coordinates, m is the slope and C is the constant distance from the origin. We can write like this ax+by+c=0 ⇒ [ y= -(c/b)-(a/b)x] so from this equation we can say that a/b=m=slope of line. We need to keep two things in mind 1] Everywhere θ is the same for a unique line. 2] C is different for every line if it becomes the same then θ will be different. Here θ is the angle from the x-axis. In Machine Learning we maximum time deals with the nD array so there is no such thing as x,y there we represent as (x1,x2) and constant a,b,c in the form of W. Now our equation becomes ax+by+c=0 ⇒ w1x1+w2x2+w0=0.

fig (i)

Plane (3D)

As we discussed in 2D similarly we can make an equation of 3D i.e w1x1+w2x2+w3x3+w0=0. In Machine Learning we denote the plane as π.

Hyperplane (nD)

Here we will generalize an equation for different planes. Similarly, from above we can write w0+w1x1+w2x2+w3x3+w4x4+w5x5……..+wnxn=0 ⇒ w0+∑ i=1 wixi=0 ⇒ w0+[w1,w2,w3,w4,……wn][[x1],[x2],[x3],[x4],[x5]……..[xn]] ⇒ w0+wTx=0. In fig (ii) we can see that w is in column vector and x is also in column vector. Therefore we have taken Transpose of W.

fig(ii)

--

--