# Nakafa Learning Content

> For AI agents: use [llms.txt](https://nakafa.com/llms.txt) for the site index. Markdown versions are available by appending `.md` to content URLs or sending `Accept: text/markdown`.

URL: https://nakafa.com/en/subjects/mathematics/analytic-geometry/equation-of-a-tangent-line-to-a-circle
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/material/lesson/mathematics/analytic-geometry/equation-of-a-tangent-line-to-a-circle/en.mdx

Learn tangent line equations using substitution, distance, and quadratic methods. Solve problems from external points with worked solutions.

---

## Understanding Tangent Line Equations

Have you ever noticed how a bicycle wheel moves on the road? When the wheel rotates, there's one point at the edge of the wheel that always touches the asphalt perfectly. Well, imagine if we could draw a straight line from that point of contact - that's what we call a **tangent line**!

This lesson focuses on finding the **explicit mathematical equation** of a tangent line. The equation tells us exactly which straight line touches the circle at one point.

The ability to determine tangent line equations is very useful in engineering, physics, and even art. Imagine an architect designing a bridge arch, or an engineer calculating projectile trajectories.

## Substitution for Specific Points

When we already know which point on the circle will be touched by the tangent line, our work becomes more focused. Let's look at a systematic approach for this case.

Component: LineEquation
Props:
- title: Tangent Line at a Specific Point
- description: Constructing the tangent line equation when the point of tangency is known.
- data: [
{
points: Array.from({ length: 361 }, (_, i) => {
const angle = (i * Math.PI) / 180;
const radius = 4;
return {
x: radius * Math.cos(angle),
y: radius * Math.sin(angle),
z: 0,
};
}),
color: getColor("INDIGO"),
showPoints: false,
},
{
points: [
{
x: 0,
y: 0,
z: 0,
}
],
color: getColor("ORANGE"),
showPoints: true,
labels: [{ text: "Center", at: 0, offset: [-0.8, -0.5, 0] }],
},
{
points: (() => {
const angle = Math.PI * 5/6; // 150 degrees
const radius = 4;
return [{
x: radius * Math.cos(angle),
y: radius * Math.sin(angle),
z: 0,
}];
})(),
color: getColor("LIME"),
showPoints: true,
labels: [{ text: "M", at: 0, offset: [-0.8, 0.5, 0] }],
},
{
points: (() => {
const angle = Math.PI * 5/6;
const radius = 4;
const pointX = radius * Math.cos(angle);
const pointY = radius * Math.sin(angle);

// Direction perpendicular to radius (negative reciprocal gradient)
const perpSlope = -pointX / pointY;

const range = 5;
return [
{
x: pointX - range,
y: pointY + perpSlope * (-range),
z: 0,
},
{
x: pointX + range,
y: pointY + perpSlope * range,
z: 0,
}
];
})(),
color: getColor("EMERALD"),
showPoints: false,
smooth: false,
labels: [{ text: "Tangent", at: 0, offset: [4, 3.5, 0] }],
},
{
points: (() = ... [truncated; 1763 chars]
- cameraPosition: [0, 0, 12]
- showZAxis: false

For circle $$x^2 + y^2 = r^2$$ with point of tangency $$M(p, q)$$, we use the **direct substitution formula**:

Visible text: For circle with point of tangency , we use the **direct substitution formula**:

```math
px + qy = r^2
```

Why does this formula work? Because the tangent line is always perpendicular to the radius at the point of tangency. If the radius has direction vector $$(p, q)$$, then the tangent line has the same normal vector, which is $$(p, q)$$.

Visible text: Why does this formula work? Because the tangent line is always perpendicular to the radius at the point of tangency. If the radius has direction vector , then the tangent line has the same normal vector, which is .

For general circle $$(x-h)^2 + (y-k)^2 = r^2$$ with point of tangency $$M(p, q)$$, the formula becomes:

Visible text: For general circle with point of tangency , the formula becomes:

```math
(p-h)(x-h) + (q-k)(y-k) = r^2
```

> The advantage of this method is speed and accuracy. We don't need to calculate gradients separately or perform complex algebraic manipulations.

## Distance Approach for Given Gradient

Now we move to a more challenging case: finding the tangent line equation when only its gradient is known. Here we use the principle that the distance from the circle's center to the tangent line must equal the radius.

Component: LineEquation
Props:
- title: Tangent Line with Specific Slope
- description: Using distance approach to find equation with given gradient.
- data: [
{
points: Array.from({ length: 361 }, (_, i) => {
const angle = (i * Math.PI) / 180;
const radius = 3.5;
const h = 1, k = -0.5;
return {
x: h + radius * Math.cos(angle),
y: k + radius * Math.sin(angle),
z: 0,
};
}),
color: getColor("VIOLET"),
showPoints: false,
},
{
points: [
{ x: 1, y: -0.5, z: 0 }
],
color: getColor("ORANGE"),
showPoints: true,
labels: [{ text: "Center", at: 0, offset: [-0.8, -0.5, 0] }],
},
{
points: (() => {
const m = -0.75; // desired gradient
const h = 1, k = -0.5, r = 3.5;
const c1 = k - m*h + r * Math.sqrt(1 + m * m);
const xRange = 8;
const xStart = -2;
return [
{ x: xStart, y: m * xStart + c1, z: 0 },
{ x: xStart + xRange, y: m * (xStart + xRange) + c1, z: 0 }
];
})(),
color: getColor("SKY"),
showPoints: false,
smooth: false,
labels: [{ text: "Upper Tangent", at: 1, offset: [1, 1, 0] }],
},
{
points: (() => {
const m = -0.75; // desired gradient
const h = 1, k = -0.5, r = 3.5;
const c2 = k - m*h - r * Math.sqrt(1 + m * m);
const xRange = 8;
const xStart = -2;
return [
{ x: xStart, y: m * xStart + c2, z: 0 },
{ x: xStart + xRange, y: m * (xStart + xRange) + c2, z: 0 }
];
})(),
color: getColor("EMERALD"),
showPoints: false,
smooth: false,
labels: [{ text: ... [truncated; 2092 chars]
- cameraPosition: [0, 0, 15]
- showZAxis: false

Suppose we have circle $$(x-h)^2 + (y-k)^2 = r^2$$ and want to find a tangent line with gradient $$m$$. The tangent line has form $$y = mx + c$$.

Visible text: Suppose we have circle and want to find a tangent line with gradient . The tangent line has form .

The key is using the **point-to-line distance formula**. The distance from center $$(h,k)$$ to line $$mx - y + c = 0$$ is:

Visible text: The key is using the **point-to-line distance formula**. The distance from center to line is:

```math
d = \frac{|mh - k + c|}{\sqrt{m^2 + 1}}
```

Since the line is tangent to the circle, this distance must exactly equal the radius:

Component: MathContainer
Children:

```math
\frac{|mh - k + c|}{\sqrt{m^2 + 1}} = r
```

```math
|mh - k + c| = r\sqrt{m^2 + 1}
```

```math
mh - k + c = \pm r\sqrt{m^2 + 1}
```

Thus we obtain two constant values:

```math
c = k - mh \pm r\sqrt{m^2 + 1}
```

Therefore, the equations of both tangent lines are:

```math
y = mx + k - mh \pm r\sqrt{m^2 + 1}
```

## Quadratic Method for External Points

The most challenging case is when we want to draw tangent lines from a point outside the circle. From one external point, we can draw exactly two tangent lines with different gradients.

Component: LineEquation
Props:
- title: Tangent Line from External Point
- description: Using quadratic method in gradient for points outside the circle.
- data: [
{
points: Array.from({ length: 361 }, (_, i) => {
const angle = (i * Math.PI) / 180;
const radius = 2.8;
const h = -1, k = 1.5;
return {
x: h + radius * Math.cos(angle),
y: k + radius * Math.sin(angle),
z: 0,
};
}),
color: getColor("PURPLE"),
showPoints: false,
},
{
points: [
{ x: -1, y: 1.5, z: 0 }
],
color: getColor("ORANGE"),
showPoints: true,
labels: [{ text: "Center", at: 0, offset: [-0.8, -0.5, 0] }],
},
{
points: [
{ x: 3.5, y: 4, z: 0 }
],
color: getColor("AMBER"),
showPoints: true,
labels: [{ text: "External", at: 0, offset: [0.5, 0.5, 0] }],
},
{
points: (() => {
// First tangent point - intersection of tangent line with circle
const px = 3.5, py = 4, h = -1, k = 1.5, r = 2.8;

// Calculate gradient of first tangent line
const a = (h - px)*(h - px) - r*r;
const b = -2*(h - px)*(k - py);
const c = (k - py)*(k - py) - r*r;

const discriminant = b*b - 4*a*c;
const m1 = (-b + Math.sqrt(discriminant)) / (2*a);

// Tangent line equation: y = m1*x + c1
const c1 = py - m1*px;

// Substitute y = m1*x + c1 into (x-h)^2 + (y-k)^2 = r^2
// (x-h)^2 + (m1*x + c1 - k)^2 = r^2
const A = 1 + m1*m1;
const B = 2*m1*(c1 - k) - 2*h;
const C = (c1 - k)*(c1 - k) + h*h - r*r;

const discX = B* ... [truncated; 4285 chars]
- cameraPosition: [0, 0, 15]
- showZAxis: false

To solve this problem, we use the **quadratic equation in gradient** approach. Let the external point be $$P(x_0, y_0)$$ and the circle have equation $$x^2 + y^2 = r^2$$.

Visible text: To solve this problem, we use the **quadratic equation in gradient** approach. Let the external point be and the circle have equation .

The tangent line from point $$P$$ has form $$y - y_0 = m(x - x_0)$$, or $$y = mx - mx_0 + y_0$$.

Visible text: The tangent line from point has form , or .

Substitute into the circle equation and use the condition that discriminant equals zero:

Component: MathContainer
Children:

```math
x^2 + (mx - mx_0 + y_0)^2 = r^2
```

```math
(1 + m^2)x^2 + 2m(y_0 - mx_0)x + (y_0 - mx_0)^2 - r^2 = 0
```

Discriminant equals zero gives a quadratic equation in $$m$$:

Visible text: Discriminant equals zero gives a quadratic equation in :

```math
(x_0^2 - r^2)m^2 - 2x_0y_0m + (y_0^2 - r^2) = 0
```

The two roots of this equation are the gradients of both tangent lines.

## Complete Applied Example

Let's solve one concrete case to clarify understanding. Determine the tangent line equation for circle $$x^2 + y^2 = 25$$ passing through point $$A(7, 1)$$.

Visible text: Let's solve one concrete case to clarify understanding. Determine the tangent line equation for circle passing through point .

**Step** $$1$$: Verify that point $$A$$ is outside the circle.

Visible text: **Step** : Verify that point is outside the circle.

```math
7^2 + 1^2 = 49 + 1 = 50 > 25 \quad \checkmark
```

**Step** $$2$$: Form quadratic equation in gradient with $$x_0 = 7$$, $$y_0 = 1$$, $$r^2 = 25$$:

Visible text: **Step** : Form quadratic equation in gradient with , , :

Component: MathContainer
Children:

```math
(49 - 25)m^2 - 2(7)(1)m + (1 - 25) = 0
```

```math
24m^2 - 14m - 24 = 0
```

```math
12m^2 - 7m - 12 = 0
```

**Step** $$3$$: Solve using quadratic formula:

Visible text: **Step** : Solve using quadratic formula:

```math
m = \frac{7 \pm \sqrt{49 + 576}}{24} = \frac{7 \pm \sqrt{625}}{24} = \frac{7 \pm 25}{24}
```

So $$m_1 = \frac{32}{24} = \frac{4}{3}$$ and $$m_2 = \frac{-18}{24} = -\frac{3}{4}$$.

Visible text: So and .

**Step** $$4$$: Construct final equations:

Visible text: **Step** : Construct final equations:

Component: MathContainer
Children:

```math
y - 1 = \frac{4}{3}(x - 7) \Rightarrow 4x - 3y = 25
```

```math
y - 1 = -\frac{3}{4}(x - 7) \Rightarrow 3x + 4y = 25
```

## Practice

1. Determine the tangent line equation for circle $$x^2 + y^2 = 16$$ at point $$(2\sqrt{2}, 2\sqrt{2})$$.

2. Find the tangent line equation for circle $$x^2 + y^2 = 9$$ with gradient $$-\frac{1}{2}$$.

3. Determine the tangent line equation for circle $$(x-3)^2 + (y-4)^2 = 25$$ passing through point $$(11, 10)$$.

4. A circle has equation $$x^2 + y^2 - 6x - 8y = 0$$. Determine the tangent line equation parallel to line $$3x + 4y = 7$$.

Visible text: 1. Determine the tangent line equation for circle at point .

2. Find the tangent line equation for circle with gradient .

3. Determine the tangent line equation for circle passing through point .

4. A circle has equation . Determine the tangent line equation parallel to line .

### Answer Key

1. **Solution**:

   For circle $$x^2 + y^2 = 16$$ at point $$(2\sqrt{2}, 2\sqrt{2})$$, use the formula:

   
   
   ```math
   x \cdot x_1 + y \cdot y_1 = r^2
   ```

   **Step** $$1$$: Substitute tangent point coordinates

   <MathContainer>
     
   
   ```math
   x \cdot 2\sqrt{2} + y \cdot 2\sqrt{2} = 16
   ```

     
   
   ```math
   2\sqrt{2}x + 2\sqrt{2}y = 16
   ```

   </MathContainer>

   **Step** $$2$$: Simplify by dividing both sides by $$2\sqrt{2}$$

   
   
   ```math
   x + y = \frac{16}{2\sqrt{2}} = \frac{8}{\sqrt{2}} = \frac{8\sqrt{2}}{2} = 4\sqrt{2}
   ```

   So the tangent line equation is $$x + y = 4\sqrt{2}$$.

2. **Solution**:

   For gradient $$m = -\frac{1}{2}$$ and $$r = 3$$, use the formula:

   
   
   ```math
   y = mx \pm r\sqrt{1 + m^2}
   ```

   **Step** $$1$$: Calculate value of $$\sqrt{1 + m^2}$$

   
   
   ```math
   \sqrt{1 + m^2} = \sqrt{1 + \left(-\frac{1}{2}\right)^2} = \sqrt{1 + \frac{1}{4}} = \sqrt{\frac{5}{4}} = \frac{\sqrt{5}}{2}
   ```

   **Step** $$2$$: Substitute into formula

   
   
   ```math
   y = -\frac{1}{2}x \pm 3 \cdot \frac{\sqrt{5}}{2} = -\frac{1}{2}x \pm \frac{3\sqrt{5}}{2}
   ```

   So the two tangent line equations are: $$y = -\frac{1}{2}x + \frac{3\sqrt{5}}{2}$$ and $$y = -\frac{1}{2}x - \frac{3\sqrt{5}}{2}$$.

3. **Solution**:

   Circle $$(x-3)^2 + (y-4)^2 = 25$$ has center $$(3,4)$$ and radius $$r = 5$$.

   **Step** $$1$$: Check position of point $$(11,10)$$

   
   
   ```math
   (11-3)^2 + (10-4)^2 = 8^2 + 6^2 = 64 + 36 = 100 > 25
   ```

   Point is outside the circle.

   **Step** $$2$$: Use quadratic equation in gradient. With coordinate translation to circle center, point $$(11,10)$$ becomes $$(8,6)$$ relative to center.

   **Step** $$3$$: Quadratic equation in gradient for circle $$x^2 + y^2 = 25$$ from point $$(8,6)$$:

   <MathContainer>
     
   
   ```math
   (8^2 - 25)m^2 - 2(8)(6)m + (6^2 - 25) = 0
   ```

     
   
   ```math
   39m^2 - 96m + 11 = 0
   ```

   </MathContainer>

   **Step** $$4$$: Using quadratic formula:

   <MathContainer>
     
   
   ```math
   m = \frac{96 \pm \sqrt{96^2 - 4(39)(11)}}{2(39)} = \frac{96 \pm \sqrt{9216 - 1716}}{78}
   ```

     
   
   ```math
   m = \frac{96 \pm \sqrt{7500}}{78} = \frac{96 \pm 50\sqrt{3}}{78}
   ```

   </MathContainer>

   **Step** $$5$$: Simplify gradients and determine tangent line equation through point $$(11,10)$$:

   <MathContainer>
     
   
   ```math
   m_1 = \frac{96 + 50\sqrt{3}}{78} \text{ and} m_2 = \frac{96 - 50\sqrt{3}}{78}
   ```

   </MathContainer>

   Both tangent line equations can be written in form $$y - 10 = m(x - 11)$$.

4. **Solution**:

   **Step** $$1$$: Convert circle equation to standard form by completing the square

   <MathContainer>
     
   
   ```math
   x^2 + y^2 - 6x - 8y = 0
   ```

     
   
   ```math
   (x^2 - 6x + 9) + (y^2 - 8y + 16) = 9 + 16
   ```

     
   
   ```math
   (x-3)^2 + (y-4)^2 = 25
   ```

   </MathContainer>

   Center $$(3,4)$$, radius $$r = 5$$.

   **Step** $$2$$: Line $$3x + 4y = 7$$ can be written as $$y = -\frac{3}{4}x + \frac{7}{4}$$

   Parallel line gradient: $$m = -\frac{3}{4}$$

   **Step** $$3$$: For circle with center $$(3,4)$$, parallel tangent line equation:

   <MathContainer>
     
   
   ```math
   y - 4 = -\frac{3}{4}(x - 3) \pm 5\sqrt{1 + \frac{9}{16}}
   ```

     
   
   ```math
   y - 4 = -\frac{3}{4}(x - 3) \pm 5 \cdot \frac{5}{4}
   ```

     
   
   ```math
   y = -\frac{3}{4}x + \frac{9}{4} + 4 \pm \frac{25}{4}
   ```

   </MathContainer>

   **Step** $$4$$: Simplify both equations

   <MathContainer>
     
   
   ```math
   y = -\frac{3}{4}x + \frac{50}{4} = -\frac{3}{4}x + \frac{25}{2}
   ```

     
   
   ```math
   y = -\frac{3}{4}x
   ```

   </MathContainer>

   So the two tangent line equations are: $$y = -\frac{3}{4}x + \frac{25}{2}$$ and $$y = -\frac{3}{4}x$$.

Visible text: 1. **Solution**:

 For circle at point , use the formula:

 
 

 **Step** : Substitute tangent point coordinates

 <MathContainer>
 
 

 
 

 </MathContainer>

 **Step** : Simplify by dividing both sides by 

 
 

 So the tangent line equation is .

2. **Solution**:

 For gradient and , use the formula:

 
 

 **Step** : Calculate value of 

 
 

 **Step** : Substitute into formula

 
 

 So the two tangent line equations are: and .

3. **Solution**:

 Circle has center and radius .

 **Step** : Check position of point 

 
 

 Point is outside the circle.

 **Step** : Use quadratic equation in gradient. With coordinate translation to circle center, point becomes relative to center.

 **Step** : Quadratic equation in gradient for circle from point :

 <MathContainer>
 
 

 
 

 </MathContainer>

 **Step** : Using quadratic formula:

 <MathContainer>
 
 

 
 

 </MathContainer>

 **Step** : Simplify gradients and determine tangent line equation through point :

 <MathContainer>
 
 

 </MathContainer>

 Both tangent line equations can be written in form .

4. **Solution**:

 **Step** : Convert circle equation to standard form by completing the square

 <MathContainer>
 
 

 
 

 
 

 </MathContainer>

 Center , radius .

 **Step** : Line can be written as 

 Parallel line gradient: 

 **Step** : For circle with center , parallel tangent line equation:

 <MathContainer>
 
 

 
 

 
 

 </MathContainer>

 **Step** : Simplify both equations

 <MathContainer>
 
 

 
 

 </MathContainer>

 So the two tangent line equations are: and .