Esercizi sulla distanza tra un punto e una retta

Esercizi sulla distanza tra un punto e una retta Esercizi sulla distanza tra un punto e una retta
Esercizi sulla distanza tra un punto e una retta

Versione italiana

Esercizi sulla distanza tra un punto e una retta

Distanza Punto-Retta con Vettori

Introduzione

La distanza tra un punto e una retta nel piano può essere calcolata utilizzando i vettori. Consideriamo un punto P(x_0, y_0)P(x0,y0)P(x_0, y_0) e una retta definita dall'equazione parametrica:

\mathbf{r}(t) = \mathbf{a} + t \mathbf{b}
r(t)=a+tb\mathbf{r}(t) = \mathbf{a} + t \mathbf{b}

Dove:

  • \mathbf{a}a\mathbf{a} è un punto sulla retta (ad esempio, A(x_1, y_1)A(x1,y1)A(x_1, y_1)).
  • \mathbf{b}b\mathbf{b} è un vettore direttore della retta.
  • t è un parametro.

Formula della Distanza

La distanza d tra il punto P e la retta può essere calcolata utilizzando la seguente formula:

d = \frac{|\mathbf{AP} \cdot \mathbf{n}|}{|\mathbf{n}|}
d=APnnd = \frac{|\mathbf{AP} \cdot \mathbf{n}|}{|\mathbf{n}|}

Dove:

  • \mathbf{AP}AP\mathbf{AP} è il vettore che va dal punto A sulla retta al punto P.
  • \mathbf{n}n\mathbf{n} è un vettore normale alla retta.

Vettore Normale

Se \mathbf{b} = \begin{bmatrix} b_1 \\ b_2 \end{bmatrix}b=[b1b2]\mathbf{b} = \begin{bmatrix} b_1 \\ b_2 \end{bmatrix}, un vettore normale \mathbf{n}n\mathbf{n} alla retta può essere dato da:

\mathbf{n} = \begin{bmatrix} -b_2 \\ b_1 \end{bmatrix}
n=[b2b1]\mathbf{n} = \begin{bmatrix} -b_2 \\ b_1 \end{bmatrix}

Esercizi

Esercizio 1: Distanza da un Punto a una Retta

Problema: Calcola la distanza dal punto P(3, 4) alla retta definita dai punti A(1, 2) e B(5, 6).

Soluzione:

  1. Trova il vettore direttore \mathbf{b}b\mathbf{b} della retta:

    \mathbf{b} = \begin{bmatrix} 5 - 1 \\ 6 - 2 \end{bmatrix} = \begin{bmatrix} 4 \\ 4 \end{bmatrix}
    b=[5162]=[44]\mathbf{b} = \begin{bmatrix} 5 - 1 \\ 6 - 2 \end{bmatrix} = \begin{bmatrix} 4 \\ 4 \end{bmatrix}
  2. Trova il vettore \mathbf{AP}AP\mathbf{AP}:

    \mathbf{AP} = \begin{bmatrix} 3 - 1 \\ 4 - 2 \end{bmatrix} = \begin{bmatrix} 2 \\ 2 \end{bmatrix}
    AP=[3142]=[22]\mathbf{AP} = \begin{bmatrix} 3 - 1 \\ 4 - 2 \end{bmatrix} = \begin{bmatrix} 2 \\ 2 \end{bmatrix}
  3. Calcola il vettore normale \mathbf{n}n\mathbf{n}:

    \mathbf{n} = \begin{bmatrix} -4 \\ 4 \end{bmatrix}
    n=[44]\mathbf{n} = \begin{bmatrix} -4 \\ 4 \end{bmatrix}
  4. Calcola il prodotto scalare \mathbf{AP} \cdot \mathbf{n}APn\mathbf{AP} \cdot \mathbf{n}:

    \mathbf{AP} \cdot \mathbf{n} = \begin{bmatrix} 2 \\ 2 \end{bmatrix} \cdot \begin{bmatrix} -4 \\ 4 \end{bmatrix} = 2(-4) + 2(4) = -8 + 8 = 0
    APn=[22][44]=2(4)+2(4)=8+8=0\mathbf{AP} \cdot \mathbf{n} = \begin{bmatrix} 2 \\ 2 \end{bmatrix} \cdot \begin{bmatrix} -4 \\ 4 \end{bmatrix} = 2(-4) + 2(4) = -8 + 8 = 0
  5. Calcola la norma di \mathbf{n}n\mathbf{n}:

    |\mathbf{n}| = \sqrt{(-4)^2 + 4^2} = \sqrt{16 + 16} = \sqrt{32} = 4\sqrt{2}
    n=(4)2+42=16+16=32=42|\mathbf{n}| = \sqrt{(-4)^2 + 4^2} = \sqrt{16 + 16} = \sqrt{32} = 4\sqrt{2}
  6. Calcola la distanza d:

    d = \frac{|\mathbf{AP} \cdot \mathbf{n}|}{|\mathbf{n}|} = \frac{|0|}{4\sqrt{2}} = 0
    d=APnn=042=0d = \frac{|\mathbf{AP} \cdot \mathbf{n}|}{|\mathbf{n}|} = \frac{|0|}{4\sqrt{2}} = 0

Quindi, la distanza dal punto P(3, 4) alla retta è 0, il che significa che il punto si trova sulla retta.

Esercizio 2: Distanza da un Punto a una Retta

Problema: Calcola la distanza dal punto P(2, 3) alla retta definita dall'equazione 2x + 3y - 6 = 0.

Soluzione:

  1. Trova un punto sulla retta. Scegliamo A(0, 2) (quando x = 0):

    • Verifica: 2(0) + 3(2) - 6 = 0 → 0 + 6 - 6 = 0 (quindi A(0, 2) è un punto sulla retta).
  2. Trova un altro punto sulla retta. Scegliamo B(3, 0) (quando y = 0):

    • Verifica: 2(3) + 3(0) - 6 = 0 → 6 + 0 - 6 = 0 (quindi B(3, 0) è un altro punto sulla retta).
  3. Trova il vettore direttore \mathbf{b}b\mathbf{b} della retta:

    \mathbf{b} = \begin{bmatrix} 3 - 0 \\ 0 - 2 \end{bmatrix} = \begin{bmatrix} 3 \\ -2 \end{bmatrix}
    b=[3002]=[32]\mathbf{b} = \begin{bmatrix} 3 - 0 \\ 0 - 2 \end{bmatrix} = \begin{bmatrix} 3 \\ -2 \end{bmatrix}
  4. Trova il vettore \mathbf{AP}AP\mathbf{AP}:

    \mathbf{AP} = \begin{bmatrix} 2 - 0 \\ 3 - 2 \end{bmatrix} = \begin{bmatrix} 2 \\ 1 \end{bmatrix}
    AP=[2032]=[21]\mathbf{AP} = \begin{bmatrix} 2 - 0 \\ 3 - 2 \end{bmatrix} = \begin{bmatrix} 2 \\ 1 \end{bmatrix}
  5. Calcola il vettore normale \mathbf{n}n\mathbf{n}:

    • Dalla retta 2x + 3y - 6 = 0, il vettore normale è dato da \mathbf{n} = \begin{bmatrix} 2 \\ 3 \end{bmatrix}n=[23]\mathbf{n} = \begin{bmatrix} 2 \\ 3 \end{bmatrix}.
  6. Calcola il prodotto scalare \mathbf{AP} \cdot \mathbf{n}APn\mathbf{AP} \cdot \mathbf{n}:

    \mathbf{AP} \cdot \mathbf{n} = \begin{bmatrix} 2 \\ 1 \end{bmatrix} \cdot \begin{bmatrix} 2 \\ 3 \end{bmatrix} = 2(2) + 1(3) = 4 + 3 = 7
    APn=[21][23]=2(2)+1(3)=4+3=7\mathbf{AP} \cdot \mathbf{n} = \begin{bmatrix} 2 \\ 1 \end{bmatrix} \cdot \begin{bmatrix} 2 \\ 3 \end{bmatrix} = 2(2) + 1(3) = 4 + 3 = 7
  7. Calcola la norma di \mathbf{n}n\mathbf{n}:

    |\mathbf{n}| = \sqrt{(2)^2 + (3)^2} = \sqrt{4 + 9} = \sqrt{13}
    n=(2)2+(3)2=4+9=13|\mathbf{n}| = \sqrt{(2)^2 + (3)^2} = \sqrt{4 + 9} = \sqrt{13}
  8. Calcola la distanza d:

    d = \frac{|\mathbf{AP} \cdot \mathbf{n}|}{|\mathbf{n}|} = \frac{|7|}{\sqrt{13}} = \frac{7}{\sqrt{13}} \approx 1.94
    d=APnn=713=7131.94d = \frac{|\mathbf{AP} \cdot \mathbf{n}|}{|\mathbf{n}|} = \frac{|7|}{\sqrt{13}} = \frac{7}{\sqrt{13}} \approx 1.94

Quindi, la distanza dal punto P(2, 3) alla retta 2x + 3y - 6 = 0 è \frac{7}{\sqrt{13}}713\frac{7}{\sqrt{13}} unità, che è approssimativamente 1.94 unità.

English version

Exercises on the distance between a point and a line

Point-Line Distance with Vectors

Introduction

The distance between a point and a line in the plane can be calculated using vectors. Consider a point P(x_0, y_0)P(x0,y0)P(x_0, y_0) and a line defined by the parametric equation:

\mathbf{r}(t) = \mathbf{a} + t \mathbf{b}
r(t)=a+tb\mathbf{r}(t) = \mathbf{a} + t \mathbf{b}

Where:

  • \mathbf{a}a\mathbf{a} is a point on the line (for example, A(x_1, y_1)A(x1,y1)A(x_1, y_1)).
  • \mathbf{b}b\mathbf{b} is a direction vector of the line.
  • t is a parameter.

Distance Formula

The distance d between the point P and the line can be calculated using the following formula:

d = \frac{|\mathbf{AP} \cdot \mathbf{n}|}{|\mathbf{n}|}
d=APnnd = \frac{|\mathbf{AP} \cdot \mathbf{n}|}{|\mathbf{n}|}

Where:

  • \mathbf{AP}AP\mathbf{AP} is the vector from point A on the line to point P.
  • \mathbf{n}n\mathbf{n} is a vector normal to the line.

Normal Vector

If \mathbf{b} = \begin{bmatrix} b_1 \\ b_2 \end{bmatrix}b=[b1b2]\mathbf{b} = \begin{bmatrix} b_1 \\ b_2 \end{bmatrix}, a normal vector \mathbf{n}n\mathbf{n} to the line can be given by:

\mathbf{n} = \begin{bmatrix} -b_2 \\ b_1 \end{bmatrix}
n=[b2b1]\mathbf{n} = \begin{bmatrix} -b_2 \\ b_1 \end{bmatrix}

Exercises

Exercise 1: Distance from a Point to a Line

Problem: Calculate the distance from the point P(3, 4) to the line defined by the points A(1, 2) and B(5, 6).

Solution:

  1. Find the director vector \mathbf{b}b\mathbf{b} of the line:
\mathbf{b} = \begin{bmatrix} 5 - 1 \\ 6 - 2 \end{bmatrix} = \begin{bmatrix} 4 \\ 4 \end{bmatrix}
b=[5162]=[44]\mathbf{b} = \begin{bmatrix} 5 - 1 \\ 6 - 2 \end{bmatrix} = \begin{bmatrix} 4 \\ 4 \end{bmatrix}
  1. Find the vector \mathbf{AP}AP\mathbf{AP}:
\mathbf{AP} = \begin{bmatrix} 3 - 1 \\ 4 - 2 \end{bmatrix} = \begin{bmatrix} 2 \\ 2 \end{bmatrix}
AP=[3142]=[22]\mathbf{AP} = \begin{bmatrix} 3 - 1 \\ 4 - 2 \end{bmatrix} = \begin{bmatrix} 2 \\ 2 \end{bmatrix}
  1. Calculate the normal vector \mathbf{n}n\mathbf{n}:
\mathbf{n} = \begin{bmatrix} -4 \\ 4 \end{bmatrix}
n=[44]\mathbf{n} = \begin{bmatrix} -4 \\ 4 \end{bmatrix}
  1. Calculate the scalar product \mathbf{AP} \cdot \mathbf{n}APn\mathbf{AP} \cdot \mathbf{n}:
\mathbf{AP} \cdot \mathbf{n} = \begin{bmatrix} 2 \\ 2 \end{bmatrix} \cdot \begin{bmatrix} -4 \\ 4 \end{bmatrix} = 2(-4) + 2(4) = -8 + 8 = 0 
APn=[22][44]=2(4)+2(4)=8+8=0\mathbf{AP} \cdot \mathbf{n} = \begin{bmatrix} 2 \\ 2 \end{bmatrix} \cdot \begin{bmatrix} -4 \\ 4 \end{bmatrix} = 2(-4) + 2(4) = -8 + 8 = 0
  1. Calculate the norm of \mathbf{n}n\mathbf{n}:
 |\mathbf{n}| = \sqrt{(-4)^2 + 4^2} = \sqrt{16 + 16} = \sqrt{32} = 4\sqrt{2}
n=(4)2+42=16+16=32=42 |\mathbf{n}| = \sqrt{(-4)^2 + 4^2} = \sqrt{16 + 16} = \sqrt{32} = 4\sqrt{2}
  1. Calculate the distance d:
d = \frac{|\mathbf{AP} \cdot \mathbf{n}|}{|\mathbf{n}|} = \frac{|0|}{4\sqrt{2}} = 0
d=APnn=042=0d = \frac{|\mathbf{AP} \cdot \mathbf{n}|}{|\mathbf{n}|} = \frac{|0|}{4\sqrt{2}} = 0

So, the distance from the point P(3, 4) to the line is 0, which means that the point is on the line.

Exercise 2: Distance from a Point to a Line

Problem: Calculate the distance from the point P(2, 3) to the line defined by the equation 2x + 3y - 6 = 0.

Solution:

  1. Find a point on the line. Let's choose A(0, 2) (when x = 0):
  • Verify: 2(0) + 3(2) - 6 = 0 → 0 + 6 - 6 = 0 (so A(0, 2) is a point on the line).
  1. Find another point on the line. Let's choose B(3, 0) (when y = 0):
  • Verify: 2(3) + 3(0) - 6 = 0 → 6 + 0 - 6 = 0 (so B(3, 0) is another point on the line).
  1. Find the director vector \mathbf{b}b\mathbf{b} of the line:
\mathbf{b} = \begin{bmatrix} 3 - 0 \\ 0 - 2 \end{bmatrix} = \begin{bmatrix} 3 \\ -2 \end{bmatrix}
b=[3002]=[32]\mathbf{b} = \begin{bmatrix} 3 - 0 \\ 0 - 2 \end{bmatrix} = \begin{bmatrix} 3 \\ -2 \end{bmatrix}
  1. Find the vector \mathbf{AP}AP\mathbf{AP}:
\mathbf{AP} = \begin{bmatrix} 2 - 0 \\ 3 - 2 \end{bmatrix} = \begin{bmatrix} 2 \\ 1 \end{bmatrix}
AP=[2032]=[21]\mathbf{AP} = \begin{bmatrix} 2 - 0 \\ 3 - 2 \end{bmatrix} = \begin{bmatrix} 2 \\ 1 \end{bmatrix}
  1. Calculate the normal vector \mathbf{n}n\mathbf{n}:
  • From the line 2x + 3y - 6 = 0, the normal vector is given by

\mathbf{n} = \begin{bmatrix} 2 \\ 3 \end{bmatrix}n=[23]\mathbf{n} = \begin{bmatrix} 2 \\ 3 \end{bmatrix}.

  1. Calculate the dot product \mathbf{AP} \cdot \mathbf{n}APn\mathbf{AP} \cdot \mathbf{n}:
\mathbf{AP} \cdot \mathbf{n} = \begin{bmatrix} 2 \\ 1 \end{bmatrix} \cdot \begin{bmatrix} 2 \\ 3 \end{bmatrix} = 2(2) + 1(3) = 4 + 3 = 7 
APn=[21][23]=2(2)+1(3)=4+3=7\mathbf{AP} \cdot \mathbf{n} = \begin{bmatrix} 2 \\ 1 \end{bmatrix} \cdot \begin{bmatrix} 2 \\ 3 \end{bmatrix} = 2(2) + 1(3) = 4 + 3 = 7
  1. Compute the norm of \mathbf{n}n\mathbf{n}:
 |\mathbf{n}| = \sqrt{(2)^2 + (3)^2} = \sqrt{4 + 9} = \sqrt{13}
n=(2)2+(3)2=4+9=13 |\mathbf{n}| = \sqrt{(2)^2 + (3)^2} = \sqrt{4 + 9} = \sqrt{13}
  1. Calculate the distance d:
d = \frac{|\mathbf{AP} \cdot \mathbf{n}|}{|\mathbf{n}|} = \frac{|7|}{\sqrt{13}} = \frac{7}{\sqrt{13}} \approx 1.94
d=APnn=713=7131.94d = \frac{|\mathbf{AP} \cdot \mathbf{n}|}{|\mathbf{n}|} = \frac{|7|}{\sqrt{13}} = \frac{7}{\sqrt{13}} \approx 1.94

So, the distance from the point P(2, 3) to the line 2x + 3y - 6 = 0 is \frac{7}{\sqrt{13}}713\frac{7}{\sqrt{13}} units, which is approximately 1.94 units.

Commenti