Lecture 6 - Lines and Planes

Updated 4 Oct 2026

Lecture 1 - Linear Systems, Determinants, Vectors and Matrices

Lines in 2D

General equation

  • General equation of a line in 2D is given by ax+by+c=0ax+by+c=0
    • ถ้าเจอให้สมการแบบนี้มาแล้วให้เปลี่ยนเป็น Parametric → จัด y=y= ก่อน แล้วจัดซักตัวเป็น tt

y-y_0=m(x-x_0)
$$
- ต้องรู้ จุดที่ผ่าน (x0,y0)(x_0,y_0) และ Slope (mm)

Parametric equation

r⃗=r0⃗+tP⃗\vec{r}=\vec{r_0}+t\vec{P} [xy]=[x0y0]+t[ab]\begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} + t \begin{bmatrix} a \\ b \end{bmatrix}
  • (x0,y0)(x_0,y_0) คือจุดที่เส้นตรงนี้ผ่าน
  • P⃗\vec{P} คือ Vector ที่ขนานกับเส้นตรง
    • อย่าลืมว่าหาจากได้จากเอา y2−y1y_2-y_1
x=x0+aty=y0+btz=z0+ct\begin{aligned} x=x_0+at\\ y=y_0+bt\\ z=z_0+ct \end{aligned}

Lines and Planes in 3D

General equation of a Plane in 3D

Ax+By+Cz+D=0Ax+By+Cz+D=0
  • โดย A,B,C,DA,B,C,D สามารถ หาได้จาก ถ้าเรารู้ Three points in space A=∣1y1z11y2z21y3z3∣,B=∣x11z1x21z2x31z3∣,C=∣x1y11x2y21x3y31∣,D=∣x1y1z1x2y2z2x3y3z3∣A = \begin{vmatrix} 1 & y_1 & z_1 \\ 1 & y_2 & z_2 \\ 1 & y_3 & z_3 \end{vmatrix}, \quad B = \begin{vmatrix} x_1 & 1 & z_1 \\ x_2 & 1 & z_2 \\ x_3 & 1 & z_3 \end{vmatrix}, \quad C = \begin{vmatrix} x_1 & y_1 & 1 \\ x_2 & y_2 & 1 \\ x_3 & y_3 & 1 \end{vmatrix}, \quad D = \begin{vmatrix} x_1 & y_1 & z_1 \\ x_2 & y_2 & z_2 \\ x_3 & y_3 & z_3 \end{vmatrix}
    • แทนด้วย 1 ตามนี้เลย
  • Normal Vector คือ N⃗=⟨A,B,C⟩\vec{N}=\left\langle A,B,C\right\rangle
    • แล้วก็มี Unit Normal Vector ด้วย— ก็แค่เอาไปหารด้วย Norm
  • Plane 1 และ Plane 2 จะ Parallel ก็ต่อเมื่อ N1=N2N_1=N_2 หรือ N1=−N2N_1=-N_2 จะดูจาก Unit Normal Vector ก็ได้ หรือว่ามองว่ามันคูณด้วยอะไรเพื่อได้อีกตัวรึเปล่า

Lines in 3D

  • A line in 3D can be defined as an intersection of 2 non-parallel planes

    ก็ถูกต้องใช่มั้ย 2 Planes ตัดกัน ทำให้เกิดเป็นเส้นตรง

    A1x+B1y+C1z−D1=0A_1x+B_1y+C_1z-D_1=0 A2x+B2y+C2z−D2=0A_2x+B_2y+C_2z-D_2=0
  • ส่วน Parametric ก็คล้าย ๆ 2D แค่เพิ่มมาอีกตัวแปรไงง

    r⃗=r0⃗+tP⃗\vec{r}=\vec{r_0}+t\vec{P}
[xyz]=[x0y0z0]+t[abc]\begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \\ z_0\end{bmatrix} + t \begin{bmatrix} a \\ b \\ c\end{bmatrix}

Relative position of lines and planes in 3D

Planes vs Planes

  1. Intersecting planes N1≠±N2N_1 \ne \pm N_2 (ถ้าเท่ากัน มันก็ขนานดิ)
  2. Parallel planes N1=±N2N_1=\pm N_2 (นี่ไง เท่ากันคือขนาน) → แต่อันนี้ต้องดู DD ด้วย ต้องต่างกัน
  3. Equal planes N1=±N2N_1=\pm N_2 (อันนี้ DD เท่ากัน มันก็คือ Plane เดียวกันไงง)
  4. Perpendicular planes (Dot product ของ N1N_1 และ N2N_2 ต้องเท่ากับ 0)

Lines vs Planes

  • เวลาเปรียบเทียบ เปรียบ Normal Vector of the plane VS Direction Vector of a line (aa)
  1. Line intersects the plane (Dot product ของ aa และ NN ต้องไม่เท่ากับ 00)
  2. The line is perpendicular to the plane (aa = NN) จะเช็คโดยการแปลงให้เป็น Unit vector ก่อนก็ได้ หรือว่าจะดูว่าเป็น Scalar คูณรึเปล่า
  3. The line is parallel to the plane (Dot product ของ aa และ NN ต้องเท่ากับ 00)
  4. The line is lies in the plane (Dot product ของ aa และ NN ต้องเท่ากับ 00)
    • To confirm that the line lies in the plane, substitute a point from the line into the plane's equation. If the point satisfies the equation, the line lies in the plane; otherwise, it's merely parallel to it.

Lines vs Lines

  1. Parallel lines a1=±a2a_1=\pm a_2
    • a1=±a2a_1=\pm a_2, but a point on one line does not satisfy the equation of the other.
  2. Coinciding line a1=±a2a_1=\pm a_2 เหมือนกันแต่
    • a1=±a2a_1=\pm a_2, and a point on one line also satisfies the equation of the other line.
  3. Skew, and intersecting lines, a1≠±a2a_1 \ne \pm a_2
    • Skew: Direction vectors are not scalar multiples, and the lines do not intersect (no solution to the system of equations).
    • Intersection: Direction vectors are not scalar multiples, but there exists a point where both lines meet (the system of equations has a solution).