What Is The Equation For Cosine? | Cosine Formula Explained

Cosine is adjacent ÷ hypotenuse in right triangles, and on a circle it’s cos(θ)=x/r.

Cosine shows up any time an angle meets a length. You’ll see it in triangles, circles, graphs, and vectors. People ask for “the” equation for cosine and get a list back. That’s normal. Cosine is one relationship, written in different forms based on the data you have.

Below you’ll get the core equations, what each symbol means, and a simple way to choose the right one without guessing.

What cosine measures

Think of an angle as a turn. Cosine tells you how much of a length lies in the horizontal direction after that turn. In a triangle, that horizontal piece is the side next to the angle. On a circle, it’s the x-coordinate of the point you land on. In vectors, it’s the alignment between two directions.

Once you see that shared meaning, the formulas stop feeling random.

What Is The Equation For Cosine? In three common forms

Most of the time, the “equation for cosine” means one of these:

  • Right triangle ratio: cos(θ) = adjacent/hypotenuse
  • Circle coordinate: cos(θ) = x/r (unit circle: cos(θ)=x)
  • Vector angle rule: cos(θ) = (a·b)/(|a||b|)

Pick the form that matches your picture: right triangle, coordinate plane, or vectors.

Cosine as a right triangle ratio

In a right triangle, choose an acute angle and call it θ. The hypotenuse is across from the 90° corner. The adjacent side touches θ and isn’t the hypotenuse.

cos(θ) = adjacent ÷ hypotenuse

This ratio is fast when you have a triangle diagram. It also explains why cosine stays between −1 and 1: the adjacent side can’t exceed the hypotenuse.

Two habits that save time

  1. Label opposite, adjacent, and hypotenuse from the angle you’re using. If θ changes, the labels can change.
  2. Keep the hypotenuse special: it is always opposite the right angle.

Solving for a missing side is plain algebra. If the unknown is on top, multiply. If it’s on the bottom, divide.

Finding cosine when you only have legs

Sometimes a right triangle problem gives you the two legs but not the hypotenuse. You can still use cosine. First find the hypotenuse with the Pythagorean theorem, then use adjacent ÷ hypotenuse.

Say the legs are 5 and 12, and θ sits next to the side of length 5. The hypotenuse is √(5²+12²)=13, so cos(θ)=5/13. That one step—getting the hypotenuse—turns a stuck problem into a quick ratio.

Cosine on the unit circle and any circle

The ratio form is a slice of a bigger picture. Place a circle centered at the origin. Draw an angle θ in standard position. The terminal side meets the circle at (x, y).

On a circle with radius r:

cos(θ) = x/r

On the unit circle, r = 1, so:

cos(θ) = x

OpenStax states this x-coordinate definition in its unit circle section. OpenStax “Unit Circle: Sine and Cosine Functions” matches the graphing view used in algebra and precalculus.

Why this form works for all angles

A right triangle handles 0° to 90°. A circle spans a full turn. When the point sits left of the y-axis, x is negative, so cosine is negative. When the point sits on the y-axis, x is 0, so cosine is 0.

This view also makes radians feel less mysterious. On the unit circle, the radian measure equals arc length, so the cosine function changes smoothly as θ increases.

Quick sense checks from the circle

When θ is 0°, the point is (1,0), so cosine is 1. When θ is 90°, the point is (0,1), so cosine is 0. When θ is 180°, the point is (−1,0), so cosine is −1. Those anchor points help you catch sign mistakes before they cost points.

Cosine from coordinates

If you’re given a point (x, y) and asked for cosine of its angle from the origin, you don’t need to build a triangle from scratch. Use the radius.

  • Compute r = √(x² + y²).
  • Compute cos(θ) = x/r.

This pops up in analytic geometry and in trig problems that start with a point on a circle.

Cosine from vectors and the dot product

Cosine also measures how aligned two vectors are. Same direction gives cosine 1. Right angles give cosine 0. Opposite directions give cosine −1.

cos(θ) = (a·b) / (|a||b|)

a·b is the dot product, and |a| is the magnitude of a. In coordinates, a·b is the sum of component-wise products, and magnitudes come from square roots of sums of squares.

If your dot product is 0, you can stop early: the vectors are perpendicular, so θ is 90° and cosine is 0.

Cosine identities for rewriting angles

Some problems give you cos(θ) and ask for cos(2θ), or give you cos(α) and cos(β) and ask for cos(α+β). That’s where identities help.

NIST’s Digital Library of Mathematical Functions lists standard trigonometric identities, including cosine addition and subtraction formulas. NIST DLMF “Identities” is a reliable reference for the canonical forms.

Angle sum and difference

cos(α + β) = cos(α)cos(β) − sin(α)sin(β)

cos(α − β) = cos(α)cos(β) + sin(α)sin(β)

These are the workhorses behind exact values like cos(75°). Split 75° into 45°+30°, plug in known sines and cosines, and simplify.

Double angle

cos(2θ) = 2cos²(θ) − 1

cos(2θ) = 1 − 2sin²(θ)

Pick the version that matches what you already have on the page.

Pythagorean link

sin²(θ) + cos²(θ) = 1

This comes from the unit circle equation x² + y² = 1 with x = cos(θ) and y = sin(θ). If you know sin(θ), you can solve for cos(θ) up to a sign, then use the quadrant to choose the sign.

Table: Cosine equations by situation

Where it applies Equation What you plug in
Right triangle (acute θ) cos(θ)=adjacent/hypotenuse Two side lengths from a right triangle
Unit circle cos(θ)=x x-coordinate of the unit circle point
Circle of radius r cos(θ)=x/r Point (x,y) and r=√(x²+y²)
Vectors cos(θ)=(a·b)/(|a||b|) Dot product and magnitudes
Any triangle c²=a²+b²−2abcos(C) SSS or SAS triangle data
Angle sum cos(α+β)=cosαcosβ−sinαsinβ Trig values of α and β
Double angle cos(2θ)=2cos²θ−1 cos(θ) when 2θ is needed
From three sides cos(C)=(a²+b²−c²)/(2ab) SSS data when you need angle C

Cosine in any triangle: the Law of Cosines

Most triangles aren’t right triangles. The Law of Cosines links sides and angles in any triangle.

With sides a, b, c opposite angles A, B, C:

c² = a² + b² − 2ab cos(C)

If angle C is 90°, then cos(C)=0 and the formula becomes the Pythagorean theorem. That’s a nice sanity check.

Two setups where it shines

  • SAS: two sides and the included angle → find the third side.
  • SSS: three sides → find an angle by isolating cosine.

For SSS, isolate cosine and then apply arccos:

cos(C) = (a² + b² − c²)/(2ab)

Cosine as a function and inverse cosine

In function notation, cosine takes an angle and returns a number:

y = cos(x)

Its outputs always stay in the range −1 to 1. Its period is 2π radians, so cos(x+2π)=cos(x).

Inverse cosine goes the other way:

θ = arccos(k) means cos(θ)=k

Most calculators return a principal angle from 0 to π radians. If you need more angles, the unit circle gives them: one in quadrant I or II, plus another that mirrors across the x-axis.

Calculator tip that prevents a lot of pain

If you type arccos(0.5) in degree mode, you’ll get 60. In radian mode, you’ll get about 1.0472. Both are right answers in different units. The fix is simple: set the mode first, then keep the unit consistent through the problem.

How to choose the right equation without guessing

Here’s a quick decision path you can reuse:

  1. Spot the setting. Right triangle, any triangle, circle/graph, or vectors.
  2. Match the data. Side lengths suggest ratios or the Law of Cosines. Coordinates suggest x/r. Vector components suggest dot product.
  3. Check units. Degree problems want degree mode. Radian problems want radian mode.
  4. Check signs. On a coordinate plane, cosine follows the sign of x.

Short worked set to lock it in

Right triangle side

A right triangle has hypotenuse 10 and cos(θ)=0.8. Adjacent = 0.8·10 = 8.

Cosine from a point

A point is (3, 4). r=5, so cos(θ)=3/5.

Side with the Law of Cosines

a=7, b=9, C=60°. c²=49+81−2·7·9·(1/2)=67, so c=√67.

Table: Common slips and fast fixes

Slip What it causes Fast fix
Degree and radian mode mismatch Wrong numeric output Set calculator mode before you compute
Using adjacent/hypotenuse on a non-right triangle Side labels don’t fit the triangle Switch to the Law of Cosines
Wrong adjacent side Swapped ratio Label the triangle from θ each time
Forgetting cosine can be negative Sign error On a graph, check if x is negative
Dropping parentheses in cos(α+β) Identity applied to the wrong angle Write the angle sum first, then expand
Rounding too early Drift in the final value Keep fractions or radicals until the end

Mini checklist for your notebook margin

  • Right triangle: cos(θ)=adjacent/hypotenuse.
  • Coordinates: cos(θ)=x/√(x²+y²).
  • Any triangle: c²=a²+b²−2abcos(C).
  • Vectors: cos(θ)=(a·b)/(|a||b|).
  • Rewrite angles: use angle sum, double angle, sin²+cos²=1.

That’s the full set of cosine equations you’ll use most often. Once you match the formula to the setting, cosine becomes predictable.

References & Sources