# Nakafa Framework: LLM URL: /en/subject/high-school/12/mathematics/analytic-geometry/equation-of-a-tangent-line-to-a-circle Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/subject/high-school/12/mathematics/analytic-geometry/equation-of-a-tangent-line-to-a-circle/en.mdx Output docs content for large language models. --- export const metadata = { title: "Equation of a Tangent Line to a Circle", description: "Master tangent line equations using substitution, distance, and quadratic methods. Solve problems from external points with complete step-by-step solutions.", 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"; ## Unveiling the Mystery of Tangent Lines 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**! Unlike simply determining the position or relation of lines, this time we will delve deeper: how to find the **explicit mathematical equation** of the tangent line. It's like searching for a secret code that describes the exact path a line must follow to touch a circle perfectly. 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. { 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: (() => { const angle = Math.PI * 5/6; const radius = 4; return [ { x: 0, y: 0, z: 0 }, { x: radius * Math.cos(angle), y: radius * Math.sin(angle), z: 0, } ]; })(), color: getColor("YELLOW"), showPoints: false, smooth: false, cone: { position: "end", size: 0.3, }, labels: [{ text: "r", at: 1, offset: [1, -1, 0] }], }, { points: [ { x: -6, y: 0, z: 0 }, { x: 6, y: 0, z: 0 } ], color: getColor("FUCHSIA"), showPoints: false, smooth: false, }, { points: [ { x: 0, y: -5, z: 0 }, { x: 0, y: 5, z: 0 } ], color: getColor("FUCHSIA"), showPoints: false, smooth: false, }, ]} cameraPosition={[0, 0, 12]} showZAxis={false} /> For circle with point of tangency , we use the **direct substitution formula**: 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 with point of tangency , the formula becomes: > 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. { 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: "Lower Tangent", at: 0, offset: [-0.5, -1.5, 0] }], }, { points: (() => { const m = -0.75; const h = 1, k = -0.5, r = 3.5; // Calculate tangent point for upper line const c1 = k - m*h + r * Math.sqrt(1 + m * m); // Find tangent point by substitution const a = 1 + m*m; const b = 2*m*(c1 - k) - 2*h; const c = (c1 - k)*(c1 - k) + h*h - r*r; const discriminant = b*b - 4*a*c; const tangentX = (-b + Math.sqrt(discriminant)) / (2*a); const tangentY = m * tangentX + c1; return [ { x: h, y: k, z: 0 }, { x: tangentX, y: tangentY, z: 0 } ]; })(), color: getColor("AMBER"), showPoints: false, smooth: false, cone: { position: "end", size: 0.2, }, }, { points: [ { x: -3, y: 0, z: 0 }, { x: 7, y: 0, z: 0 } ], color: getColor("PINK"), showPoints: false, smooth: false, }, { points: [ { x: 0, y: -5, z: 0 }, { x: 0, y: 4, z: 0 } ], color: getColor("PINK"), showPoints: false, smooth: false, }, ]} cameraPosition={[0, 0, 15]} showZAxis={false} /> 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 to line is: Since the line is tangent to the circle, this distance must exactly equal the radius:
Thus we obtain two constant values: Therefore, the equations of both tangent lines are: ## 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. { 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*B - 4*A*C; // Two solutions, choose the one in the correct direction const x1 = (-B + Math.sqrt(discX)) / (2*A); const x2 = (-B - Math.sqrt(discX)) / (2*A); // Choose x that gives the correct tangent point // Tangent point should be between center and external point in certain direction const xTangent = Math.abs(x1 - h) < Math.abs(x2 - h) ? x1 : x2; const yTangent = m1 * xTangent + c1; return [{ x: xTangent, y: yTangent, z: 0 }]; })(), color: getColor("CYAN"), showPoints: true, labels: [{ text: "S₁", at: 0, offset: [-0.5, -0.5, 0] }], }, { points: (() => { // Second 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 second 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 m2 = (-b - Math.sqrt(discriminant)) / (2*a); // Tangent line equation: y = m2*x + c2 const c2 = py - m2*px; // Substitute y = m2*x + c2 into (x-h)^2 + (y-k)^2 = r^2 // (x-h)^2 + (m2*x + c2 - k)^2 = r^2 const A = 1 + m2*m2; const B = 2*m2*(c2 - k) - 2*h; const C = (c2 - k)*(c2 - k) + h*h - r*r; const discX = B*B - 4*A*C; // Two solutions, choose the one in the correct direction const x1 = (-B + Math.sqrt(discX)) / (2*A); const x2 = (-B - Math.sqrt(discX)) / (2*A); // Choose x that gives the correct tangent point const xTangent = Math.abs(x1 - h) < Math.abs(x2 - h) ? x1 : x2; const yTangent = m2 * xTangent + c2; return [{ x: xTangent, y: yTangent, z: 0 }]; })(), color: getColor("CYAN"), showPoints: true, labels: [{ text: "S₂", at: 0, offset: [0.5, 0.5, 0] }], }, { points: (() => { // First tangent line const px = 3.5, py = 4, h = -1, k = 1.5, r = 2.8; 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); const c1 = py - m1*px; // Determine consistent line length const lineLength = 6; return [ { x: px, y: py, z: 0 }, { x: px - lineLength, y: m1 * (px - lineLength) + c1, z: 0 } ]; })(), color: getColor("TEAL"), showPoints: false, smooth: false, labels: [{ text: "Tangent 1", at: 0, offset: [0.5, -1, 0] }], }, { points: (() => { // Second tangent line const px = 3.5, py = 4, h = -1, k = 1.5, r = 2.8; 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 m2 = (-b - Math.sqrt(discriminant)) / (2*a); const c2 = py - m2*px; // Use same line length for visual consistency const lineLength = 6; return [ { x: px, y: py, z: 0 }, { x: px - lineLength, y: m2 * (px - lineLength) + c2, z: 0 } ]; })(), color: getColor("INDIGO"), showPoints: false, smooth: false, labels: [{ text: "Tangent 2", at: 0, offset: [0.5, 1, 0] }], }, { points: [ { x: -5, y: 0, z: 0 }, { x: 5, y: 0, z: 0 } ], color: getColor("ROSE"), showPoints: false, smooth: false, }, { points: [ { x: 0, y: -2, z: 0 }, { x: 0, y: 6, z: 0 } ], color: getColor("ROSE"), showPoints: false, smooth: false, }, ]} cameraPosition={[0, 0, 15]} showZAxis={false} /> 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 , or . Substitute into the circle equation and use the condition that discriminant equals zero:
Discriminant equals zero gives a quadratic equation in : 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 passing through point . **Step 1**: Verify that point A is outside the circle. **Step 2**: Form quadratic equation in gradient with , , :
**Step 3**: Solve using quadratic formula: So and . **Step 4**: Construct final equations:
## Practice 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 at point , use the formula: **Step 1**: Substitute tangent point coordinates
**Step 2**: Simplify by dividing both sides by So the tangent line equation is . 2. **Solution**: For gradient and , use the formula: **Step 1**: Calculate value of **Step 2**: Substitute into formula So the two tangent line equations are: and . 3. **Solution**: Circle has center and radius . **Step 1**: Check position of point Point is outside the circle. **Step 2**: Use quadratic equation in gradient. With coordinate translation to circle center, point becomes relative to center. **Step 3**: Quadratic equation in gradient for circle from point :
**Step 4**: Using quadratic formula:
**Step 5**: Simplify gradients and determine tangent line equation through point :
Both tangent line equations can be written in form . 4. **Solution**: **Step 1**: Convert circle equation to standard form by completing the square
Center , radius . **Step 2**: Line can be written as Parallel line gradient: **Step 3**: For circle with center , parallel tangent line equation:
**Step 4**: Simplify both equations
So the two tangent line equations are: and .