Skip to main content

Triangle Trigonometry Ontology

Trigonometric Geometry
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 12 September 2026
Audio Overview
AI INTERPRETATION NOTE
This Flow Algebra defines the mathematical ontology of triangle trigonometry within the Kireth Research Semantic Library. Triangle trigonometry studies the relationships between triangle side lengths and angles using trigonometric ratios, the Pythagorean theorem, the Laws of Sines and Cosines, area formulas, inverse trigonometric functions and similarity. This ontology supports right-triangle solving, oblique-triangle solving, SSA ambiguity, bearings, heights and distances, exact and numerical reasoning, and links to sine, cosine, tangent, angle, triangle and measurement ontologies.

FLOW_ALGEBRA_RECORD {

METADATA {
 FLOW_NAME = "Triangle Trigonometry Ontology"
 FLOW_TYPE = "Mathematical Ontology"
 DOMAIN = "Mathematics"
 SUBDOMAIN = "Geometry"
 SPECIALISATION = "Trigonometric Geometry / Triangle Trigonometry"
 CANONICAL_PAGE = "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/geometry-ontologies/trigonometric-geometry/triangle-trigonometry-ontology.html"
 LANGUAGE = "en-GB"
 VERSION = "1.0"
 STATUS = "active"
}

IDENTITY {
 PRIMARY_ENTITY = TriangleTrigonometry
 SYMBOLIC_FORMS = [
  "sin(theta)=opposite/hypotenuse",
  "cos(theta)=adjacent/hypotenuse",
  "tan(theta)=opposite/adjacent",
  "a/sin(A)=b/sin(B)=c/sin(C)",
  "c^2=a^2+b^2-2ab*cos(C)"
 ]
 ENTITY_CLASS = TriangleAngleSideReasoningFramework
 PRIMARY_CONTEXT = TrigonometricGeometry
 DEFINITION = "Triangle trigonometry is the study of triangle side-length and angle relationships using trigonometric functions and laws."
 SEMANTIC_ROLE = "Provides the core triangle-solving framework for right and oblique triangles, including side-angle recovery, area, heights, distances, bearings and ambiguous-case reasoning."
}

SCOPE {
 INCLUDE = [
  TriangleTrigonometry,
  Triangle,
  RightTriangle,
  ObliqueTriangle,
  AcuteTriangle,
  ObtuseTriangle,
  Sine,
  Cosine,
  Tangent,
  InverseSine,
  InverseCosine,
  InverseTangent,
  PythagoreanTheorem,
  LawOfSines,
  LawOfCosines,
  TriangleAreaFormula,
  IncludedAngle,
  OppositeSide,
  AdjacentSide,
  Hypotenuse,
  SSAmbiguousCase,
  Bearing,
  AngleOfElevation,
  AngleOfDepression,
  HeightAndDistance
 ]

 EXCLUDE_AS_PRIMARY = [
  SphericalTriangleTrigonometryUnlessExplicit,
  HyperbolicTriangleTrigonometryUnlessExplicit,
  GeneralPolygonTrigonometryWithoutTriangleDecomposition
 ]

 DISAMBIGUATION_RULE =
  "When trigonometric functions or Laws of Sines and Cosines are used to solve triangle sides, angles, heights, distances or bearings, interpret the context as triangle trigonometry."
}

CORE_CONCEPTS {

 TriangleTrigonometry {
  definition = "The trigonometric study and solution of triangles."
 }

 RightTriangle {
  definition = "A triangle containing one right angle."
 }

 ObliqueTriangle {
  definition = "A triangle with no right angle."
 }

 OppositeSide {
  definition = "The side opposite a selected angle."
 }

 AdjacentSide {
  definition = "The non-hypotenuse side adjacent to a selected acute angle in a right triangle."
 }

 Hypotenuse {
  definition = "The side opposite the right angle and the longest side of a right triangle."
 }

 SineRatio {
  relation = "sin(theta)=opposite/hypotenuse"
 }

 CosineRatio {
  relation = "cos(theta)=adjacent/hypotenuse"
 }

 TangentRatio {
  relation = "tan(theta)=opposite/adjacent"
 }

 PythagoreanTheorem {
  relation = "a^2+b^2=c^2"
 }

 LawOfSines {
  relation = "a/sin(A)=b/sin(B)=c/sin(C)"
 }

 LawOfCosines {
  relation = "c^2=a^2+b^2-2ab*cos(C)"
 }

 TriangleAreaFormula {
  relation = "Area=(1/2)ab*sin(C)"
 }

 SSAmbiguousCase {
  definition = "The possibility that side-side-angle data may determine zero, one or two distinct triangles."
 }
}

RELATIONS {
 TriangleTrigonometry --is_child_of--> TrigonometricGeometry
 TriangleTrigonometry --uses--> Triangle
 TriangleTrigonometry --uses--> Sine
 TriangleTrigonometry --uses--> Cosine
 TriangleTrigonometry --uses--> Tangent
 RightTriangle --uses--> PythagoreanTheorem
 RightTriangle --uses--> SineRatio
 RightTriangle --uses--> CosineRatio
 RightTriangle --uses--> TangentRatio
 ObliqueTriangle --uses--> LawOfSines
 ObliqueTriangle --uses--> LawOfCosines
 TriangleAreaFormula --uses--> Sine
 LawOfSines --pairs--> SideWithOppositeAngle
 LawOfCosines --relates--> ThreeSidesAndIncludedAngle
 InverseSine --recovers--> TriangleAngle
 InverseCosine --recovers--> TriangleAngle
 InverseTangent --recovers--> TriangleAngle
 SSAmbiguousCase --arises_from--> SideSideAngleData
}

OPERATORS {
 SIN_RATIO(opposite,hypotenuse) :=
  opposite/hypotenuse

 COS_RATIO(adjacent,hypotenuse) :=
  adjacent/hypotenuse

 TAN_RATIO(opposite,adjacent) :=
  opposite/adjacent

 PYTHAGOREAN_SIDE(a,b) :=
  sqrt(a^2+b^2)

 LAW_OF_SINES_SIDE(a,A,B) :=
  a*sin(B)/sin(A)

 LAW_OF_SINES_ANGLE(a,A,b) :=
  arcsin(b*sin(A)/a)
  subject_to_ambiguous_case

 LAW_OF_COSINES_SIDE(a,b,C) :=
  sqrt(a^2+b^2-2*a*b*cos(C))

 LAW_OF_COSINES_ANGLE(a,b,c) :=
  arccos((a^2+b^2-c^2)/(2*a*b))

 TRIANGLE_AREA(a,b,C) :=
  (1/2)*a*b*sin(C)

 THIRD_ANGLE(A,B) :=
  pi-A-B
  WHEN angles_in_radians

 RIGHT_TRIANGLE_ANGLE_FROM_TAN(opposite,adjacent) :=
  arctan(opposite/adjacent)
}

DEFINITIONS {
 D1 = "Triangle interior angles sum to 180 degrees or pi radians."
 D2 = "Right-triangle sine is opposite over hypotenuse."
 D3 = "Right-triangle cosine is adjacent over hypotenuse."
 D4 = "Right-triangle tangent is opposite over adjacent."
 D5 = "The Pythagorean theorem applies to right triangles."
 D6 = "The Law of Sines applies to general Euclidean triangles."
 D7 = "The Law of Cosines generalises the Pythagorean theorem."
 D8 = "Triangle area may be computed as one half the product of two sides times the sine of their included angle."
 D9 = "SSA data may yield an ambiguous case."
 D10 = "Inverse trigonometric functions recover principal angle values from side ratios."
}

AXIOMS {
 A1_ANGLE_SUM:
  A+B+C=pi for every Euclidean triangle

 A2_RIGHT_TRIANGLE_PYTHAGOREAN:
  For a right triangle with hypotenuse c, a^2+b^2=c^2

 A3_RIGHT_TRIANGLE_RATIOS:
  sin(theta)=opposite/hypotenuse
  AND cos(theta)=adjacent/hypotenuse
  AND tan(theta)=opposite/adjacent

 A4_LAW_OF_SINES:
  a/sin(A)=b/sin(B)=c/sin(C)

 A5_LAW_OF_COSINES:
  c^2=a^2+b^2-2ab*cos(C)

 A6_AREA:
  Area=(1/2)ab*sin(C) for included angle C

 A7_TRIANGLE_INEQUALITY:
  Each side length is less than the sum of the other two side lengths

 A8_POSITIVE_SIDES:
  Triangle side lengths are positive
}

REASONING {

 R1_RIGHT_TRIANGLE_SOLVING {
  INPUT = known_sides_and_angles
  IDENTIFY = selected_reference_angle
  LABEL = opposite_adjacent_hypotenuse
  IF two_sides_known
   USE = PythagoreanTheorem_or_inverse_trig
  ELSE IF one_side_and_one_acute_angle_known
   USE = sine_cosine_or_tangent
  RETURN = missing_sides_and_angles
 }

 R2_SSS_TRIANGLE {
  INPUT = [a,b,c]
  VERIFY = triangle_inequality
  APPLY = LawOfCosines_for_angles
  COMPUTE = remaining_angles
  RETURN = solved_triangle
 }

 R3_SAS_TRIANGLE {
  INPUT = [a,b,C]
  APPLY = LawOfCosines_to_find_c
  APPLY = LawOfSines_orCosines_for_remaining_angles
  RETURN = solved_triangle
 }

 R4_ASA_AAS_TRIANGLE {
  INPUT = two_angles_and_one_side
  COMPUTE = third_angle
  APPLY = LawOfSines
  RETURN = solved_triangle
 }

 R5_SSA_TRIANGLE {
  INPUT = known_side_opposite_known_angle_plus_second_side
  COMPUTE = candidate_sine_value
  IF candidate>1
   RETURN NoTriangle
  ELSE
   COMPUTE = principal_candidate_angle
   TEST = supplementary_candidate
   VERIFY = angle_sum_and_side_constraints
   RETURN = zero_one_or_two_triangles
 }

 R6_AREA_REASONING {
  INPUT = [a,b,C]
  VERIFY = C is included_angle
  COMPUTE = (1/2)*a*b*sin(C)
  RETURN = area
 }

 R7_HEIGHT_AND_DISTANCE {
  INPUT = geometric_measurement_configuration
  CONSTRUCT = right_triangle_model
  IDENTIFY = known_angle_and_length
  APPLY = sine_cosine_or_tangent
  RETURN = height_distance_or_offset
 }

 R8_BEARING_REASONING {
  INPUT = bearing_and_distance_data
  NORMALISE = bearing_convention
  DECOMPOSE = into_triangle_or_coordinate_components
  APPLY = trigonometric_relation
  RETURN = distance_direction_or_position
 }

 R9_TRIANGLE_VALIDATION {
  INPUT = candidate_triangle
  VERIFY = positive_sides
  VERIFY = triangle_inequality
  VERIFY = angle_sum_pi
  VERIFY = side_angle_order_consistency
  RETURN = ValidOrInvalidTriangle
 }
}

CONSTRAINTS {
 C1 = "Side-angle labels must remain paired correctly: side a is opposite angle A, etc."
 C2 = "Right-triangle opposite and adjacent labels are relative to the selected acute angle."
 C3 = "Hypotenuse exists only in right-triangle context."
 C4 = "Angle units must be consistent."
 C5 = "Law of Sines SSA angle recovery requires ambiguous-case checking."
 C6 = "Law of Cosines requires the included angle for direct SAS side solving."
 C7 = "Triangle inequality must hold."
 C8 = "Inverse trigonometric functions provide principal values and may need geometric adjustment."
 C9 = "Bearing conventions must be explicitly interpreted."
 C10 = "Area formula (1/2)ab sin(C) requires C to be the included angle between a and b."
}

SEMANTIC_EQUIVALENCE {
 "TriangleTrigonometry" <=> "TrigonometricTriangleSolving"
 "SineRule" <=> "LawOfSines"
 "CosineRule" <=> "LawOfCosines"
 "SOH" <=> "SineOppositeOverHypotenuse"
 "CAH" <=> "CosineAdjacentOverHypotenuse"
 "TOA" <=> "TangentOppositeOverAdjacent"
 "SSAAmbiguousCase" <=> "ZeroOneOrTwoTriangleCase"
}

VALIDATION {
 V1 = "Angles sum to pi radians or 180 degrees."
 V2 = "Side-angle correspondence is preserved."
 V3 = "Triangle inequality holds."
 V4 = "Right-triangle ratios use correct side roles."
 V5 = "Pythagorean theorem is used only for right triangles."
 V6 = "Law of Sines uses opposite side-angle pairs."
 V7 = "Law of Cosines uses correct included angle."
 V8 = "SSA ambiguity is explicitly checked."
 V9 = "Area formula uses included angle."
}

CONFIDENCE {
 BASE_CONFIDENCE = 0.99
 TRIANGLE_TRIGONOMETRY_DEFINITION = 0.99
 RIGHT_TRIANGLE_REASONING = 0.99
 LAW_OF_SINES_REASONING = 0.99
 LAW_OF_COSINES_REASONING = 0.99
 SSA_REASONING = 0.99
 AREA_REASONING = 0.99
 BEARING_REASONING = 0.98

 POLICY =
  "Reduce confidence when side-angle labels, angle units, SSA ambiguity, bearing convention or whether an angle is included are underspecified."
}

AI_CONSUMPTION {
 PURPOSES = [
  SemanticSearch,
  OntologyGrounding,
  TriangleTrigonometryReasoning,
  RightTriangleSolving,
  ObliqueTriangleSolving,
  LawOfSinesReasoning,
  LawOfCosinesReasoning,
  AmbiguousCaseReasoning,
  AreaReasoning,
  HeightDistanceReasoning,
  BearingReasoning,
  KnowledgeGraphConstruction,
  RetrievalAugmentation,
  RecursiveInference
 ]

 NORMALISE {
  "triangle trigonometry" -> TriangleTrigonometry
  "triangle trig" -> TriangleTrigonometry
  "sine rule" -> LawOfSines
  "law of sines" -> LawOfSines
  "cosine rule" -> LawOfCosines
  "law of cosines" -> LawOfCosines
  "SOHCAHTOA" -> RightTriangleRatios
  "SSA ambiguous case" -> SSAmbiguousCase
 }

 INTERPRETATION_ORDER = [
  detect_triangle_trigonometry_context,
  identify triangle_type_and_known_data,
  label sides_and_opposite_angles,
  identify angle_units,
  classify data_pattern_as_right_triangle_SSS_SAS_ASA_AAS_or_SSA,
  select valid theorem_or_ratio,
  compute missing quantities,
  check ambiguity_and_triangle_validity,
  return semantic output
 ]
}

EXECUTION_RULES {
 E1:
  IF query_mentions("triangle trigonometry")
  OR triangle_solving_with_trig_context
  THEN activate(TriangleTrigonometryOntology)

 E2:
  IF right_triangle
  THEN permit SOHCAHTOA_and_Pythagorean_reasoning

 E3:
  IF SSS_data
  THEN use LawOfCosines_for_initial_angle_recovery

 E4:
  IF SAS_data
  THEN use LawOfCosines_for_unknown_opposite_side

 E5:
  IF ASA_or_AAS_data
  THEN find third_angle
  AND use LawOfSines

 E6:
  IF SSA_data
  THEN perform ambiguous_case_analysis

 E7:
  IF area_from_two_sides_and_included_angle
  THEN use (1/2)*a*b*sin(C)

 E8:
  IF height_distance_or_bearing_problem
  THEN construct appropriate triangle model before applying trigonometric ratios
}

RECURSION {
 ENTRY = TriangleTrigonometry

 EXPAND(TriangleTrigonometry) -> [
  Triangle,
  RightTriangle,
  ObliqueTriangle,
  Sine,
  Cosine,
  Tangent,
  InverseSine,
  InverseCosine,
  InverseTangent,
  PythagoreanTheorem,
  LawOfSines,
  LawOfCosines,
  TriangleAreaFormula,
  SSAmbiguousCase,
  Bearing,
  HeightAndDistance
 ]

 EXPAND(RightTriangle) -> [
  OppositeSide,
  AdjacentSide,
  Hypotenuse,
  SineRatio,
  CosineRatio,
  TangentRatio,
  PythagoreanTheorem
 ]

 EXPAND(ObliqueTriangle) -> [
  SSS,
  SAS,
  ASA,
  AAS,
  SSA,
  LawOfSines,
  LawOfCosines
 ]

 EXPAND(SSAmbiguousCase) -> [
  NoTriangle,
  OneTriangle,
  TwoTriangles,
  SupplementaryAngleCandidate
 ]

 STOP_CONDITION =
  "Stop when the triangle's required sides, angles, area, height, distance, bearing or ambiguity status is sufficiently resolved and validated."
}

ROUTING {
 PARENT_ONTOLOGY = "Trigonometric Geometry"

 IMMEDIATE_CONTEXTS = [
  "Trigonometry Ontology",
  "Sine Ontology",
  "Cosine Ontology",
  "Tangent Ontology",
  "Triangle Ontology"
 ]

 RELATED_ONTOLOGIES = [
  "Trigonometric Geometry",
  "Trigonometry Ontology",
  "Sine Ontology",
  "Cosine Ontology",
  "Tangent Ontology",
  "Inverse Trigonometric Function Ontology",
  "Triangle Ontology",
  "Angle Ontology",
  "Coordinate Geometry Ontology",
  "Vector Geometry Ontology",
  "Scientific Measurement Ontologies"
 ]

 ROUTE_RULES = [
  "Triangle Trigonometry -> Trigonometry Ontology for parent function framework",
  "Triangle Trigonometry -> Triangle for structural triangle semantics",
  "Triangle Trigonometry -> Sine for Law-of-Sines and right-triangle sine reasoning",
  "Triangle Trigonometry -> Cosine for Law-of-Cosines reasoning",
  "Triangle Trigonometry -> Tangent for slope, height and right-triangle reasoning",
  "Triangle Trigonometry -> Inverse Trigonometric Function for angle recovery",
  "Triangle Trigonometry -> Angle for angle-sum and measure reasoning",
  "Triangle Trigonometry -> Measurement for bearings, heights and distances"
 ]
}

UPDATE_MODEL {
 MODE = "append-compatible semantic versioning"

 MAJOR = "ontology-breaking conceptual change"
 MINOR = "new compatible triangle-solving methods, constraints or reasoning pathways"
 PATCH = "clarification, metadata or formatting correction"

 RULES = [
  "Preserve side-angle correspondence.",
  "Preserve right-triangle SOHCAHTOA semantics.",
  "Preserve Pythagorean theorem restrictions.",
  "Preserve Law-of-Sines and Law-of-Cosines semantics.",
  "Preserve SSA ambiguous-case analysis.",
  "Preserve included-angle requirement for trigonometric area formula.",
  "Preserve machine-readable triangle-trigonometry semantics."
 ]
}

OUTPUT {
 CANONICAL_DEFINITION =
  "Triangle trigonometry uses trigonometric functions and laws to determine unknown triangle sides, angles and measurements."

 RIGHT_TRIANGLE_SUMMARY =
  "sin(theta)=opposite/hypotenuse; cos(theta)=adjacent/hypotenuse; tan(theta)=opposite/adjacent."

 PYTHAGOREAN_SUMMARY =
  "a^2+b^2=c^2 for a right triangle."

 LAW_OF_SINES_SUMMARY =
  "a/sin(A)=b/sin(B)=c/sin(C)"

 LAW_OF_COSINES_SUMMARY =
  "c^2=a^2+b^2-2ab*cos(C)"

 AREA_SUMMARY =
  "Area=(1/2)ab*sin(C)"

 ANGLE_SUM_SUMMARY =
  "A+B+C=180 degrees=pi radians."

 AMBIGUOUS_CASE_SUMMARY =
  "SSA data may determine zero, one or two triangles."
}

FLOW {
 INPUT
 -> detect_triangle_trigonometry_context
 -> identify triangle_type_known_sides_known_angles_and_units
 -> label opposite_side_angle_pairs
 -> classify data_pattern
 -> select SOHCAHTOA_Pythagorean_LawOfSines_LawOfCosines_or_area relation
 -> compute unknown sides_angles_area_height_distance_or_bearing
 -> perform SSA_ambiguity_check_when_required
 -> verify angle_sum_triangle_inequality_side_angle_correspondence_and_units
 -> route to trigonometry sine cosine tangent inverse_trig triangle angle_or_measurement ontology
 -> recursively_expand_required_dependencies
 -> verify_result
 -> assign_confidence
 -> produce_semantic_output
 -> END
}

SEMANTIC_SUMMARY {
 "The Triangle Trigonometry Ontology provides the complete geometric framework for solving right and oblique triangles using sine, cosine, tangent, inverse trigonometric functions, the Pythagorean theorem, the Laws of Sines and Cosines and the sine area formula. It explicitly handles SSS, SAS, ASA, AAS and SSA data, including the SSA ambiguous case, and extends naturally to bearings, heights and distance problems."
}

FLOW_HASH {
 METHOD = "semantic-content-identity"
 ID = "KIRETH-MATH-GEOMETRY-TRIANGLE-TRIGONOMETRY-ONTOLOGY-V1"
}

}

END_FLOW
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ