Circle tangent to the x-axis

Consider the circle (x2)2+(y2)2=4(x - 2)^2 + (y - 2)^2 = 4 with centre (2,2)(2, 2) and radius 22. The distance from the centre to the xx-axis is the centre's yy-coordinate, which equals the radius.

The condition for tangency

When the distance from the centre to a line equals the radius, the circle is tangent to that line. So this circle touches the xx-axis at the point directly below the centre, (2,0)(2, 0).

AxisDistance from the centreCondition for tangency
xx-axisb|b|b=r|b| = r
yy-axisa|a|a=r|a| = r

The algebra agrees

The xx-axis is y=0y = 0, and substituting gives (x2)2=0(x - 2)^2 = 0, whose solution is a repeated root: exactly one shared point. Distance or equation, both arrive at the same tangency.

The point of contact lies directly below the centre because a tangent is perpendicular to the radius at that point. A radius perpendicular to the xx-axis points straight down, so dropping the radius from the centre lands on the tangent point.

Tangent to both axes

Since this circle has centre xx-coordinate 22 and radius 22, it is tangent to the yy-axis as well: substituting x=0x = 0 gives (y2)2=0(y - 2)^2 = 0, so it touches at (0,2)(0, 2).

A circle tangent to both coordinate axes has its centre at (±r,±r)(\pm r, \pm r), that is, on the line y=xy = x or y=xy = -x. In the first quadrant such a circle is (xr)2+(yr)2=r2(x - r)^2 + (y - r)^2 = r^2, and as rr grows its centre slides out along y=xy = x while the circle stays wedged snugly into the corner.

Touching both axes, this circle sits entirely inside the first quadrant: both xx and yy stay between 00 and 44 and never stray negative. Circles pressed into a corner like this turn up whenever inscribed circles or the packing of pipes is at issue.

The same rule for any line

Read the condition as distance from the centre equals radius, and it applies to any line, not just the axes.

Distance versus radiusThe line and the circle
d<rd < rcut at two points
d=rd = rtangent
d>rd > rdo not meet

The large dots mark the tangent point and the centre.