# Nakafa Framework: LLM

URL: /en/subject/high-school/12/mathematics/analytic-geometry/position-of-a-line-to-a-circle
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/subject/high-school/12/mathematics/analytic-geometry/position-of-a-line-to-a-circle/en.mdx

Output docs content for large language models.

---

export const metadata = {
  title: "Position of a Line to a Circle",
  description: "Discover how lines intersect, touch, or miss circles using discriminant analysis. Master intersection points, tangent conditions, and solve problems.",
  authors: [{ name: "Nabil Akbarazzima Fatih" }],
  date: "05/26/2025",
  subject: "Analytic Geometry",
};

import { getColor } from "@repo/design-system/lib/color";
import { LineEquation } from "@repo/design-system/components/contents/line-equation";

## Understanding the Relationship Between Lines and Circles

Imagine you have a circle and a straight line on the same plane. Interesting, right? How can these two geometric objects interact? It turns out there are three possibilities that can occur.

The line can **intersect the circle at two points**, **be tangent to the circle at one point only**, or even **not touch the circle at all**. Just like when you throw a pencil toward a ring, the pencil can go through the ring, touch the edge of the ring, or miss completely.

This concept is very important in analytic geometry because it helps us understand various situations in real life. For example, to determine whether a highway will pass through a circular protected area, or to analyze satellite trajectories relative to certain zones.

## Three Possible Positions

Let's look at the three possible positions of a line relative to a circle visually:

<LineEquation
  title="Position of Line to Circle"
  description="Visualization of three possible positions of a line relative to a circle."
  data={[
    {
      points: Array.from({ length: 361 }, (_, i) => {
        const angle = (i * Math.PI) / 180;
        return {
          x: 3 * Math.cos(angle),
          y: 3 * Math.sin(angle),
          z: 0,
        };
      }),
      color: getColor("PURPLE"),
      showPoints: false,
    },
    {
      points: Array.from({ length: 2 }, (_, i) => {
        const xMin = -5;
        const xMax = 5;
        const y = 4.5; // Garis yang tidak berpotongan
        return {
          x: xMin + i * (xMax - xMin),
          y: y,
          z: 0,
        };
      }),
      color: getColor("ORANGE"),
      showPoints: false,
      smooth: false,
      labels: [{ text: "No intersection", at: 1, offset: [-2, 0.5, 0] }],
    },
    {
      points: Array.from({ length: 2 }, (_, i) => {
        const xMin = -5;
        const xMax = 5;
        const y = 3; // Garis singgung
        return {
          x: xMin + i * (xMax - xMin),
          y: y,
          z: 0,
        };
      }),
      color: getColor("CYAN"),
      showPoints: false,
      smooth: false,
      labels: [{ text: "Tangent", at: 1, offset: [-2, 0.5, 0] }],
    },
    {
      points: Array.from({ length: 2 }, (_, i) => {
        const xMin = -5;
        const xMax = 5;
        const y = 1; // Garis memotong
        return {
          x: xMin + i * (xMax - xMin),
          y: y,
          z: 0,
        };
      }),
      color: getColor("TEAL"),
      showPoints: false,
      smooth: false,
      labels: [{ text: "Intersects", at: 1, offset: [-2, 0.5, 0] }],
    },
    {
      points: Array.from({ length: 1 }, () => {
        return {
          x: 0,
          y: 0,
          z: 0,
        };
      }),
      color: getColor("ROSE"),
      showPoints: true,
      labels: [{ text: "P", at: 0, offset: [-0.5, -0.5, 0] }],
    },
    {
      points: Array.from({ length: 2 }, (_, i) => {
        const xMin = -6;
        const xMax = 6;
        const y = 0;
        return {
          x: xMin + i * (xMax - xMin),
          y: y,
          z: 0,
        };
      }),
      color: getColor("AMBER"),
      showPoints: false,
      smooth: false,
    },
    {
      points: Array.from({ length: 2 }, (_, i) => {
        const yMin = -4;
        const yMax = 5;
        const x = 0;
        return {
          x: x,
          y: yMin + i * (yMax - yMin),
          z: 0,
        };
      }),
      color: getColor("AMBER"),
      showPoints: false,
      smooth: false,
    },
  ]}
  cameraPosition={[0, 0, 14]}
  showZAxis={false}
/>

From the visualization above, we can see three different situations. The first line doesn't touch the circle at all, the second line touches the circle at exactly one point, and the third line penetrates the circle so it intersects at two points.

1. **Line intersects the circle** occurs when a straight line passes through the interior of the circle so that it meets the circumference of the circle at two different points.

2. **Line is tangent to the circle** occurs when a straight line only touches the circumference of the circle at exactly one point. Such a line is called a tangent line.

3. **Line does not intersect** occurs when a straight line is outside the circle so there is no point of intersection between the line and the circle.

## Discriminant Method

To determine the position of a line relative to a circle mathematically, we use the substitution method which produces a quadratic equation. Then, we analyze the **discriminant** of that quadratic equation.

Suppose we have a line with equation <InlineMath math="y = mx + c" /> and a circle with equation <InlineMath math="x^2 + y^2 + Dx + Ey + F = 0" />.

The first step is to substitute the line equation into the circle equation. It's easy, just replace all <InlineMath math="y" /> in the circle equation with <InlineMath math="mx + c" />:

<div className="flex flex-col gap-4">
  <BlockMath math="x^2 + (mx + c)^2 + Dx + E(mx + c) + F = 0" />
  <BlockMath math="x^2 + m^2x^2 + 2mcx + c^2 + Dx + Emx + Ec + F = 0" />
  <BlockMath math="(1 + m^2)x^2 + (2mc + D + Em)x + (c^2 + Ec + F) = 0" />
</div>

This substitution result forms a quadratic equation in the form <InlineMath math="ax^2 + bx + c = 0" /> with coefficients:

<div className="flex flex-col gap-4">
  <BlockMath math="a = 1 + m^2" />
  <BlockMath math="b = 2mc + D + Em" />
  <BlockMath math="c = c^2 + Ec + F" />
</div>

Now, we calculate the **discriminant** of this quadratic equation. The discriminant is a value that determines the type of roots of a quadratic equation:

<BlockMath math="\Delta = b^2 - 4ac" />

## Interpretation of Discriminant Value

This discriminant value will tell us the position of the line relative to the circle. The concept is simple:

1. **Positive discriminant** (<InlineMath math="\Delta > 0" />) means the quadratic equation has two different real roots. In geometric context, this means the line **intersects the circle at two points**.

2. **Zero discriminant** (<InlineMath math="\Delta = 0" />) means the quadratic equation has one real root (repeated root). Geometrically, the line **is tangent to the circle at one point**.

3. **Negative discriminant** (<InlineMath math="\Delta < 0" />) means the quadratic equation has no real roots. Geometrically, the line **does not intersect the circle**.

## Calculation Example

Let's look at a concrete example to make it clearer. Say we have line <InlineMath math="y = 2x - 1" /> and circle <InlineMath math="x^2 + y^2 - 4x + 2y - 4 = 0" />.

We substitute <InlineMath math="y = 2x - 1" /> into the circle equation:

<div className="flex flex-col gap-4">
  <BlockMath math="x^2 + (2x - 1)^2 - 4x + 2(2x - 1) - 4 = 0" />
  <BlockMath math="x^2 + 4x^2 - 4x + 1 - 4x + 4x - 2 - 4 = 0" />
  <BlockMath math="5x^2 - 4x - 5 = 0" />
</div>

From the quadratic equation <InlineMath math="5x^2 - 4x - 5 = 0" />, we identify its coefficients: <InlineMath math="a = 5" />, <InlineMath math="b = -4" />, and <InlineMath math="c = -5" />.

Calculate the discriminant:

<div className="flex flex-col gap-4">
  <BlockMath math="\Delta = b^2 - 4ac = (-4)^2 - 4(5)(-5)" />
  <BlockMath math="\Delta = 16 + 100 = 116" />
</div>

Since <InlineMath math="\Delta = 116 > 0" />, the line <InlineMath math="y = 2x - 1" /> **intersects the circle at two points**.

> This discriminant value not only tells us the position of the line, but also shows how many intersection points there are. The larger the positive discriminant value, the "farther" the line is from the tangent condition.

## Standard Circle Case

For circles with center at the origin like <InlineMath math="x^2 + y^2 = r^2" /> and line <InlineMath math="y = mx + c" />, the process becomes more concise.

Substitute the line into the circle:

<div className="flex flex-col gap-4">
  <BlockMath math="x^2 + (mx + c)^2 = r^2" />
  <BlockMath math="x^2 + m^2x^2 + 2mcx + c^2 = r^2" />
  <BlockMath math="(1 + m^2)x^2 + 2mcx + (c^2 - r^2) = 0" />
</div>

The discriminant for this case is:

<BlockMath math="\Delta = (2mc)^2 - 4(1 + m^2)(c^2 - r^2)" />

After simplification:

<BlockMath math="\Delta = 4[r^2(1 + m^2) - c^2]" />

The interpretation remains the same based on the sign of the discriminant.

## Practice

1. Determine the position of line <InlineMath math="y = x + 3" /> relative to circle <InlineMath math="x^2 + y^2 = 8" />.

2. Investigate the position of line <InlineMath math="y = -2x + 5" /> relative to circle <InlineMath math="x^2 + y^2 - 6x + 4y + 9 = 0" />.

3. Line <InlineMath math="2x + y - 4 = 0" /> and circle <InlineMath math="x^2 + y^2 = 5" />. What is their position relationship?

4. Determine the value of <InlineMath math="k" /> so that line <InlineMath math="y = x + k" /> is tangent to circle <InlineMath math="x^2 + y^2 = 18" />.

### Answer Key

1. **Solution**:

   Substitute <InlineMath math="y = x + 3" /> into <InlineMath math="x^2 + y^2 = 8" />:
   
   <div className="flex flex-col gap-4">
     <BlockMath math="x^2 + (x + 3)^2 = 8" />
     <BlockMath math="x^2 + x^2 + 6x + 9 = 8" />
     <BlockMath math="2x^2 + 6x + 1 = 0" />
   </div>
   
   Discriminant: <InlineMath math="\Delta = 6^2 - 4(2)(1) = 36 - 8 = 28" />
   
   Since <InlineMath math="\Delta = 28 > 0" />, the line **intersects the circle at two points**.

2. **Solution**:

   Substitute <InlineMath math="y = -2x + 5" /> into <InlineMath math="x^2 + y^2 - 6x + 4y + 9 = 0" />:
   
   <div className="flex flex-col gap-4">
     <BlockMath math="x^2 + (-2x + 5)^2 - 6x + 4(-2x + 5) + 9 = 0" />
     <BlockMath math="x^2 + 4x^2 - 20x + 25 - 6x - 8x + 20 + 9 = 0" />
     <BlockMath math="5x^2 - 34x + 54 = 0" />
   </div>
   
   Discriminant: <InlineMath math="\Delta = (-34)^2 - 4(5)(54) = 1156 - 1080 = 76" />
   
   Since <InlineMath math="\Delta = 76 > 0" />, the line **intersects the circle at two points**.

3. **Solution**:

   Change line <InlineMath math="2x + y - 4 = 0" /> to <InlineMath math="y = -2x + 4" />.
   
   Substitute into <InlineMath math="x^2 + y^2 = 5" />:
   
   <div className="flex flex-col gap-4">
     <BlockMath math="x^2 + (-2x + 4)^2 = 5" />
     <BlockMath math="x^2 + 4x^2 - 16x + 16 = 5" />
     <BlockMath math="5x^2 - 16x + 11 = 0" />
   </div>
   
   Discriminant: <InlineMath math="\Delta = (-16)^2 - 4(5)(11) = 256 - 220 = 36" />
   
   Since <InlineMath math="\Delta = 36 > 0" />, the line **intersects the circle at two points**.

4. **Solution**:

   For the line to be tangent to the circle, the discriminant must equal zero.
   
   Substitute <InlineMath math="y = x + k" /> into <InlineMath math="x^2 + y^2 = 18" />:
   
   <div className="flex flex-col gap-4">
     <BlockMath math="x^2 + (x + k)^2 = 18" />
     <BlockMath math="x^2 + x^2 + 2kx + k^2 = 18" />
     <BlockMath math="2x^2 + 2kx + (k^2 - 18) = 0" />
   </div>
   
   Discriminant: <InlineMath math="\Delta = (2k)^2 - 4(2)(k^2 - 18) = 4k^2 - 8k^2 + 144 = -4k^2 + 144" />
   
   For <InlineMath math="\Delta = 0" />:
   
   <div className="flex flex-col gap-4">
     <BlockMath math="-4k^2 + 144 = 0" />
     <BlockMath math="4k^2 = 144" />
     <BlockMath math="k^2 = 36" />
     <BlockMath math="k = \pm 6" />
   </div>
   
   Therefore the value is <InlineMath math="k = 6" /> or <InlineMath math="k = -6" />.