HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Earth and Environmental Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
Spherical Trigonometry on the Celestial Sphere
  1. 1Great circles, small circles and the celestial sphere
  2. 2The cosine and sine rules for spherical triangles
  3. 3The angular distance between two stars
  1. Space Science and Astronomy
  2. /Spherical Trigonometry on the Celestial Sphere
  3. /The cosine and sine rules for spherical triangles

Course 1.1·Lesson 2 of 3

The cosine and sine rules for spherical triangles

Three arcs of great circles make a spherical triangle. The cosine rule cos⁡a=cos⁡bcos⁡c+sin⁡bsin⁡ccos⁡A\cos a = \cos b\cos c + \sin b\sin c\cos Acosa=cosbcosc+sinbsinccosA

Lesson 2 of 3Show all lessonsHide
Spherical Trigonometry on the Celestial Sphere
  1. 1Great circles, small circles and the celestial sphere
  2. 2The cosine and sine rules for spherical triangles
  3. 3The angular distance between two stars

Try the code and the simulations beside the lesson.

A triangle with curved sides

Draw a triangle on an orange. Start at the top, go down a line of longitude to the equator, turn and walk a quarter of the way round the equator, then go back up to the top. Each corner of this triangle is a right angle. So its angles add up to 270∘270^\circ270∘. On a sphere the rules of flat triangles fail, and we need new ones.

The spherical triangle

A spherical triangle drawn on a sphere with centre O. Its three corners are A, B and C. Each side is an arc of a great circle, curved outwards. The side opposite A is labelled a, the side opposite B is b and the side opposite C is c. Thin straight lines join O to each corner. A note says that each side is measured by the angle it makes at O. At corner A, two short tangent lines show the angle A between the two great circles that meet there.

A spherical triangle has three corners joined by arcs of great circles. We name the corners AAA, BBB and CCC, and the side opposite each corner by the small letter: side aaa is opposite AAA.

  • Each side is measured by the angle it makes at the centre OOO of the sphere.
  • Each angle, such as AAA, is the angle between the two great circles that meet at that corner. It is the angle between their tangents at the corner.

We use triangles whose sides and angles are all less than 180∘180^\circ180∘.

The cosine rule

For any spherical triangle,

cos⁡a=cos⁡bcos⁡c+sin⁡bsin⁡ccos⁡A\displaystyle \cos a = \cos b\cos c + \sin b\sin c\cos Acosa=cosbcosc+sinbsinccosA

It finds the third side from two sides and the angle between them. Turned round, it finds an angle from three sides:

cos⁡A=cos⁡a−cos⁡bcos⁡csin⁡bsin⁡c\displaystyle \cos A = \dfrac{\cos a - \cos b\cos c}{\sin b\sin c}cosA=sinbsinccosa−cosbcosc​

Where it comes from. Put the unit sphere with AAA on the zzz axis. Let BBB lie in the xzxzxz plane at angle ccc from AAA, and CCC at angle bbb from AAA in a plane turned by the angle AAA. The unit vectors are B⃗=(sin⁡c,0,cos⁡c)\vec{B} = (\sin c, 0, \cos c)B=(sinc,0,cosc) and C⃗=(sin⁡bcos⁡A,sin⁡bsin⁡A,cos⁡b)\vec{C} = (\sin b\cos A, \sin b\sin A, \cos b)C=(sinbcosA,sinbsinA,cosb). The side aaa is the angle between them, so cos⁡a=B⃗⋅C⃗\cos a = \vec{B}\cdot\vec{C}cosa=B⋅C. Multiply out, and the rule appears.

The sine rule

sin⁡asin⁡A=sin⁡bsin⁡B=sin⁡csin⁡C\displaystyle \dfrac{\sin a}{\sin A} = \dfrac{\sin b}{\sin B} = \dfrac{\sin c}{\sin C}sinAsina​=sinBsinb​=sinCsinc​

It is quick, but it has a trap. The inverse sine gives two angles, xxx and 180∘−x180^\circ - x180∘−x, with the same sine. Check which one fits, for example with the cosine rule for angles.

The cosine rule for angles

From the three angles we can find a side:

cos⁡A=−cos⁡Bcos⁡C+sin⁡Bsin⁡Ccos⁡a\displaystyle \cos A = -\cos B\cos C + \sin B\sin C\cos acosA=−cosBcosC+sinBsinCcosa

So on a sphere, three angles fix the triangle and its size. On a flat sheet they fix only its shape.

Small triangles look flat

For small sides, cos⁡x≈1−x2/2\cos x \approx 1 - x^2/2cosx≈1−x2/2 and sin⁡x≈x\sin x \approx xsinx≈x, with xxx in radians. Put these in the cosine rule:

1−a22≈(1−b22)(1−c22)\displaystyle 1 - \tfrac{a^2}{2} \approx (1 - \tfrac{b^2}{2})(1 - \tfrac{c^2}{2})1−2a2​≈(1−2b2​)(1−2c2​)
+bccos⁡A\displaystyle \qquad + bc\cos A+bccosA

Keep terms up to the second power. This gives a2=b2+c2−2bccos⁡Aa^2 = b^2 + c^2 - 2bc\cos Aa2=b2+c2−2bccosA, the flat cosine rule. A triangle of stars a few degrees across is nearly flat, but a triangle tens of degrees across is not.

The spherical excess and the area

The angles of a spherical triangle always add up to more than 180∘180^\circ180∘. The extra is the spherical excess

E=A+B+C−180∘\displaystyle E = A + B + C - 180^\circE=A+B+C−180∘

Written in radians, EEE is the area of the triangle on a sphere of radius 111, in steradians. On a sphere of radius RRR the area is ER2ER^2ER2. The orange triangle above has E=90∘=π/2E = 90^\circ = \pi/2E=90∘=π/2, so its area is πR2/2\pi R^2/2πR2/2, one eighth of the sphere. That checks.

Worked example: two sides and the angle between them

A triangle has b=40∘b = 40^\circb=40∘, c=70∘c = 70^\circc=70∘ and A=100∘A = 100^\circA=100∘. Find aaa and BBB.

  1. The side. cos⁡a=cos⁡40∘cos⁡70∘+sin⁡40∘sin⁡70∘cos⁡100∘=0.2620−0.1049=0.1571\cos a = \cos 40^\circ\cos 70^\circ + \sin 40^\circ\sin 70^\circ\cos 100^\circ = 0.2620 - 0.1049 = 0.1571cosa=cos40∘cos70∘+sin40∘sin70∘cos100∘=0.2620−0.1049=0.1571. So a=80.96∘a = 80.96^\circa=80.96∘.
  2. The angle, by the sine rule. sin⁡B=sin⁡40∘×sin⁡100∘/sin⁡80.96∘=0.6410\sin B = \sin 40^\circ \times \sin 100^\circ/\sin 80.96^\circ = 0.6410sinB=sin40∘×sin100∘/sin80.96∘=0.6410. So B=39.87∘B = 39.87^\circB=39.87∘ or 140.13∘140.13^\circ140.13∘.
  3. Which one? The cosine rule for angles has the top cos⁡40∘−cos⁡80.96∘×cos⁡70∘=0.7123\cos 40^\circ - \cos 80.96^\circ \times \cos 70^\circ = 0.7123cos40∘−cos80.96∘×cos70∘=0.7123 and the bottom sin⁡80.96∘×sin⁡70∘=0.9280\sin 80.96^\circ \times \sin 70^\circ = 0.9280sin80.96∘×sin70∘=0.9280. So cos⁡B=0.7676\cos B = 0.7676cosB=0.7676, which is positive. So B=39.87∘B = 39.87^\circB=39.87∘.
  4. Check. The larger side, c=70∘c = 70^\circc=70∘, should face the larger of the angles BBB and CCC. Here bbb is the smallest side and BBB is the smallest angle. It fits.

Make both sides 2∘2^\circ2∘. Do the two curves agree? Now make both 90∘90^\circ90∘. What is side aaa on the sphere for every angle AAA, and why?

Practise with new numbers

Try it in Python

The program solves a spherical triangle from two sides and the angle between them. It finds the other angles with the cosine rule, so there is no doubt about which angle is right.

Predict first. Will the three angles add up to more or less than 180∘180^\circ180∘? Then run it. Check with Show the answer.

1. Change the sides to b = 3 and c = 4 with A = 90. Is the excess still large?

2. Set b = 90, c = 90 and A = 90. Which triangle is this?

Common mistakes

  • Using the flat cosine rule. On the sky the sides are arcs, so use cos⁡a=cos⁡bcos⁡c+sin⁡bsin⁡ccos⁡A\cos a = \cos b\cos c + \sin b\sin c\cos Acosa=cosbcosc+sinbsinccosA.
  • Taking one answer from the sine rule. sin⁡−1\sin^{-1}sin−1 gives two angles. Decide with the cosine rule.
  • Mixing a side with an angle. A side is an angle at the centre; an angle of the triangle is between two great circles at a corner.
  • Expecting 180∘180^\circ180∘. The angles of a spherical triangle add up to between 180∘180^\circ180∘ and 540∘540^\circ540∘.
  • Forgetting radians for the area. The excess must be in radians to give steradians.

Remember these

  • Cosine rule: cos⁡a=cos⁡bcos⁡c+sin⁡bsin⁡ccos⁡A\cos a = \cos b\cos c + \sin b\sin c\cos Acosa=cosbcosc+sinbsinccosA.
  • Sine rule: sin⁡a/sin⁡A=sin⁡b/sin⁡B=sin⁡c/sin⁡C\sin a/\sin A = \sin b/\sin B = \sin c/\sin Csina/sinA=sinb/sinB=sinc/sinC.
  • Angles: cos⁡A=−cos⁡Bcos⁡C+sin⁡Bsin⁡Ccos⁡a\cos A = -\cos B\cos C + \sin B\sin C\cos acosA=−cosBcosC+sinBsinCcosa.
  • Excess: E=A+B+C−180∘E = A + B + C - 180^\circE=A+B+C−180∘; area =ER2= ER^2=ER2 with EEE in radians.
  • Small triangles obey the flat rules.

Check yourself

Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.

  1. A triangle has b=c=90∘b = c = 90^\circb=c=90∘. What does the cosine rule give for aaa?
  1. A spherical triangle has angles 75∘75^\circ75∘, 80∘80^\circ80∘ and 85∘85^\circ85∘. What fraction of the sphere does it cover?
  1. The sine rule gives sin⁡B=0.5\sin B = 0.5sinB=0.5. Which two values can BBB have?
  1. Why can two spherical triangles with the same three angles not have different sizes?

References

  • W. M. Smart, Textbook on Spherical Astronomy (6th edition, Cambridge University Press), Chapter 1, Spherical trigonometry.
  • A. E. Roy and D. Clarke, Astronomy: Principles and Practice (4th edition, Institute of Physics), the chapter on spherical trigonometry.

Enroll free in Spherical Trigonometry on the Celestial Sphere

Every lesson is open to read. Enrolling also lets you:

  • Mark lessons done and carry on where you stopped.
  • Take the tests of this lesson and its course.
  • Count the course towards the certificate for its chapter.
No payment. You can leave at any time.

Problems (4)

To check the pointing of a telescope, an observer picks three reference stars, P, Q and R, far…Hard · High School (11–12) · by StemPy Lab
Star charts of small regions use flat geometry…Advanced · High School (11–12) · by StemPy Lab
On a flat sheet, three angles fix only the shape of a triangle…Advanced · High School (11–12) · by StemPy Lab
Next: lesson 3The angular distance between two stars
← Spherical Trigonometry on the Celestial Sphere
← Great circles, small circles and the celestial sphereThe angular distance between two stars →

Discussion (0)

Log in to join the discussion.

Loading…

and the sine rule
sin⁡a/sin⁡A=sin⁡b/sin⁡B\sin a/\sin A = \sin b/\sin Bsina/sinA=sinb/sinB
solve it. Its angles add up to more than
180∘180^\circ180∘
, and the extra is its area.
about 30 min1 simulation2 practice questions1 Python program5 questions to check yourself

This lesson is free to read. Enroll free to keep your place and take the tests.

A student measures the angular distances between three stars with a sextant…Hard · High School (11–12) · by StemPy Lab

Python Labs (1)

Spherical triangles in codePython Lab · by StemPy Lab