Finding the Symmetric Point of a Point About a Line

In geometry, the concept of symmetry about a line is a fascinating topic with applications in various fields. This article presents two methods—coordinate geometry and vector algebra—to find the symmetric point \( Q \) of a point \( P(m, n) \) about the line through points \( A(x_0, y_0) \) and \( B(x_1, y_1) \). We will also introduce a practical implementation using pjs, a popular JavaScript library for creative coding.

Method 1: Coordinate Geometry

Step 1: Line Equation

First, we need to determine the equation of the line passing through points \( A \) and \( B \). The slope \( k \) of the line is given by:
\[k = \frac{y_1 – y_0}{x_1 – x_0}\]
The equation of the line can be expressed in the point-slope form:
\[y – y_0 = k(x – x_0)\]

Step 2: Perpendicular Line

Next, we find the slope of the perpendicular line, which is:
\[m_{\perp} = -\frac{1}{k}\]
The equation of the perpendicular line through point \( P(m, n) \) is:
\[y – n = -\frac{1}{k}(x – m)\]

Step 3: Intersection Point

To find the intersection point \( I \) of the two lines, set their equations equal:
\[k(x – x_0) + y_0 = -\frac{1}{k}(x – m) + n\]
Rearranging gives:
\[(k^2 + 1)x = k^2 x_0 + kn + m – ky_0\]
Thus, the \( x \)-coordinate of the intersection point \( I \) is:
\[x_I = \frac{k^2 x_0 + kn + m – ky_0}{k^2 + 1}\]

Step 4: Finding \( y_I \)

Substituting \( x_I \) back into the line equation allows us to find \( y_I \):
\[y_I = kx_I – kx_0 + y_0\]

Step 5: Coordinates of \( Q \)

Finally, the coordinates of the symmetric point \( Q \) are calculated using the midpoint formula:
\[x_Q = 2x_I – m, \quad y_Q = 2y_I – n\]

Method 2: Vector Algebra

Vector algebra provides a more elegant approach to finding the symmetric point.

Step 1: Define the Vectors

Define the points as vectors:

  • \( \mathbf{A} = \begin{pmatrix} x_0 \\ y_0 \end{pmatrix} \)
  • \( \mathbf{B} = \begin{pmatrix} x_1 \\ y_1 \end{pmatrix} \)
  • \( \mathbf{P} = \begin{pmatrix} m \\ n \end{pmatrix} \)

Step 2: Direction Vector and Normal Vector

Calculate the direction vector of the line:
\[\mathbf{D} = \mathbf{B} – \mathbf{A} = \begin{pmatrix} x_1 – x_0 \\ y_1 – y_0 \end{pmatrix}\]
The normal vector \( \mathbf{N} \) to the line is:
\[\mathbf{N} = \begin{pmatrix} -(y_1 – y_0) \\ x_1 – x_0 \end{pmatrix}\]

Step 3: Project \( P \) onto the Line

The unit normal vector \( \mathbf{n} \) is:
\[\mathbf{n} = \frac{\mathbf{N}}{\|\mathbf{N}\|} = \frac{1}{\sqrt{(y_1 – y_0)^2 + (x_1 – x_0)^2}} \begin{pmatrix} -(y_1 – y_0) \\ x_1 – x_0 \end{pmatrix}\]
Calculate the vector \( \mathbf{AP} \):
\[\mathbf{AP} = \mathbf{P} – \mathbf{A}\]
Project \( \mathbf{AP} \) onto \( \mathbf{n} \) to find the distance \( d \):
\[d = \mathbf{AP} \cdot \mathbf{n}\]

Step 4: Find the Intersection Point \( I \)

The intersection point \( I \) can be expressed as:
\[\mathbf{I} = \mathbf{P} – d \mathbf{n}\]

Step 5: Calculate Symmetric Point \( Q \)

The symmetric point \( Q \) is:
\[\mathbf{Q} = 2\mathbf{I} – \mathbf{P}\]

Implementation in pjs

Using pjs, we can visualize this concept. Below is a simple implementation:

function setup() {
  createCanvas(800, 400);
  ellipseMode(RADIUS);
  angleMode(DEGREES);
  rectMode(CORNER);
}
function draw() {
  background(220);
  applyMatrix(1, 0, 0, -1, width / 2, height / 2);
  let mx=mouseX - width / 2;
  let my=height/2-mouseY;
  rect(-250,100,500,-200);
  let N=createVector(150,100);
  let M=createVector(mx,-100);
  let C=createVector(250,-100);
  let D=createVector(250,100);
  let C1=symmetric_point(N,M,C);
  let D1=symmetric_point(N,M,D);
  if(abs(M.x)<255){
    pp(N,M);
    pp(M,C1);
    pp(C1,D1);
    pp(D1,N);

  }
}
function show(textContent,x,y) {
  push();
  scale(1, -1); // Correct the text orientation
  //textAlign(CENTER, CENTER);
  text(textContent, x, -y);
  pop();
}
//find the symmetric point of C about the line passing throught A and B
//return the symmetric point
function symmetric_point(A,B,C){
  let AC=pVector.sub(C,A);
  let AB=pVector.sub(B,A);
  let n=createVector(-AB.y,AB.x);
  AC.reflect(n);
  AC.add(A);
  return AC;
}
function pp(A,B){
  line(A.x,A.y,B.x,B.y);
}

Explanation of the Code

Setup the Canvas: We create a 400×400 pixel canvas.
Define Points: Points \( A \), \( B \), and \( P \) are defined.
Find Symmetric Point: The function findSymmetricPoint calculates the symmetric point \( Q \) using vector operations.
Draw: The line \( AB \) and points \( P \) and \( Q \) are drawn on the canvas.

Conclusion

In this article, we explored two methods to find the symmetric point \( Q \) of point \( P(m, n) \) about the line defined by points \( A \) and \( B \). We first examined the coordinate geometry approach, followed by the vector algebra method, and concluded with a practical implementation in pjs. This comprehensive understanding not only provides mathematical insight but also offers a visual representation of symmetry in geometry.

Leave a Comment