Skip to main content

Linear Equation Ontology

Algebra Ontologies
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 20 September 2026
Audio Overview
FLOW Linear_Equation_Ontology_v1.0

PAGE:
  title: "Linear Equation Ontology"
  canonical_url: "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/algebra-ontologies/linear-equation-ontology.html"
  language: "en-GB"
  ontology_domain: "Mathematics > Algebra > Elementary Algebra > Equations > Linear Equations"
  purpose: >
    Define the semantic, structural, operational, and relational model of linear equations
    so that an AI system can recognise, classify, transform, solve, compare, verify, and
    reason about linear equations consistently across symbolic, numeric, graphical, and
    applied mathematical contexts.

DEFINE LinearEquationOntology := {

  CORE_IDENTITY: {
    entity_type: "Mathematical Ontology",
    primary_entity: LinearEquation,
    parent_entities: [
      Equation,
      AlgebraicExpression,
      ElementaryAlgebra,
      Algebra,
      MathematicalStatement
    ],
    related_entities: [
      Variable,
      Constant,
      Coefficient,
      Term,
      LinearExpression,
      Equality,
      Solution,
      SolutionSet,
      Coordinate,
      Function,
      LinearFunction,
      Graph,
      StraightLine,
      Slope,
      Intercept,
      SystemOfLinearEquations,
      Inequality
    ]
  },

  DEFINITION: {
    LinearEquation :=
      "An equation in which each variable occurs only to the first power and variables are not multiplied together.",

    canonical_single_variable_form:
      a*x + b = 0
      WHERE a != 0,

    canonical_two_variable_form:
      a*x + b*y = c
      WHERE (a,b) != (0,0),

    slope_intercept_form:
      y = m*x + b,

    point_slope_form:
      y - y1 = m*(x - x1),

    standard_two_variable_form:
      A*x + B*y = C
  },

  SEMANTIC_PRIMITIVES: {
    Variable := "A symbolic quantity whose value may vary.",
    Constant := "A fixed numerical or symbolic value.",
    Coefficient := "A multiplicative factor attached to a variable term.",
    Term := "A component of an algebraic expression separated by addition or subtraction.",
    Operator := ["+", "-", "*", "/", "="],
    Equality := "A relation asserting that two expressions have the same value.",
    Solution := "A value or tuple of values that makes the equation true.",
    SolutionSet := "The set of all solutions satisfying the equation."
  },

  STRUCTURAL_CONSTRAINTS: {
    degree_constraint:
      FOR_EACH variable v:
        exponent(v) <= 1,

    product_constraint:
      DISALLOW product(v_i, v_j)
      WHEN both operands are variables,

    nonlinear_operation_constraint:
      DISALLOW [
        v^n WHERE n > 1,
        sqrt(v),
        abs(v) WHEN used as a nonlinear defining relation,
        sin(v),
        cos(v),
        tan(v),
        exp(v),
        log(v),
        variable_in_denominator
      ],

    equality_constraint:
      REQUIRE left_expression = right_expression,

    coefficient_constraint:
      coefficients MAY belong_to [
        Integer,
        RationalNumber,
        RealNumber,
        ComplexNumber,
        SymbolicConstant
      ]
  },

  CLASSIFICATION: {

    SingleVariableLinearEquation := {
      pattern: a*x + b = c,
      condition: a != 0,
      dimensionality: 1
    },

    TwoVariableLinearEquation := {
      pattern: a*x + b*y = c,
      condition: (a,b) != (0,0),
      dimensionality: 2
    },

    MultiVariableLinearEquation := {
      pattern: Σ(a_i*x_i) = b,
      condition: EXISTS i SUCH_THAT a_i != 0,
      dimensionality: n
    },

    HomogeneousLinearEquation := {
      pattern: Σ(a_i*x_i) = 0
    },

    NonHomogeneousLinearEquation := {
      pattern: Σ(a_i*x_i) = b,
      condition: b != 0
    },

    IdentityEquation := {
      semantic_result: "true for every value in the domain",
      solution_set: Domain
    },

    ContradictoryEquation := {
      semantic_result: "false for every value in the domain",
      solution_set: EmptySet
    },

    ConditionalEquation := {
      semantic_result: "true only for one or more restricted values",
      solution_set: ProperSubset(Domain)
    }
  },

  COMPONENT_RELATIONS: {

    HAS_VARIABLE:
      LinearEquation -> Variable,

    HAS_COEFFICIENT:
      LinearEquation -> Coefficient,

    HAS_CONSTANT:
      LinearEquation -> Constant,

    HAS_TERM:
      LinearEquation -> Term,

    HAS_LEFT_SIDE:
      LinearEquation -> AlgebraicExpression,

    HAS_RIGHT_SIDE:
      LinearEquation -> AlgebraicExpression,

    USES_RELATION:
      LinearEquation -> Equality,

    HAS_SOLUTION:
      LinearEquation -> Solution,

    HAS_SOLUTION_SET:
      LinearEquation -> SolutionSet,

    REPRESENTS_GRAPH:
      TwoVariableLinearEquation -> StraightLine,

    MAY_DEFINE:
      LinearEquation -> LinearFunction
  },

  NORMALISATION: {

    INPUT:
      equation E,

    PROCESS:
      1. parse(E),
      2. identify(left_side, right_side),
      3. expand_parentheses(),
      4. combine_like_terms(),
      5. move_variable_terms_to_preferred_side(),
      6. move_constants_to_opposite_side(),
      7. reduce_coefficients(),
      8. preserve_equality(),
      9. express_in_canonical_form(),

    OUTPUT:
      NormalisedLinearEquation
  },

  SOLVING_SINGLE_VARIABLE: {

    INPUT:
      a*x + b = c,

    PRECONDITION:
      a != 0,

    TRANSFORM:
      a*x + b = c
      => a*x = c - b
      => x = (c - b)/a,

    OUTPUT:
      Solution(x),

    VERIFY:
      substitute(x, original_equation)
      => left_value == right_value
  },

  EQUIVALENCE_RULES: {

    AdditiveEquivalence:
      E_left = E_right
      <=> E_left + k = E_right + k,

    SubtractiveEquivalence:
      E_left = E_right
      <=> E_left - k = E_right - k,

    MultiplicativeEquivalence:
      E_left = E_right
      <=> k*E_left = k*E_right
      WHERE k != 0,

    DivisiveEquivalence:
      E_left = E_right
      <=> E_left/k = E_right/k
      WHERE k != 0,

    SimplificationEquivalence:
      equivalent_expression(A,B)
      => replace(A,B)
      WHEN semantic_value_preserved = TRUE
  },

  SOLUTION_CARDINALITY: {

    IF reduced_form = x = k:
      solution_count = 1,

    IF reduced_form = true_identity:
      solution_count = infinite,

    IF reduced_form = false_statement:
      solution_count = 0
  },

  GRAPH_SEMANTICS: {

    equation:
      A*x + B*y = C,

    geometric_representation:
      StraightLine,

    IF B != 0:
      slope = -A/B,
      y_intercept = C/B,

    IF B = 0 AND A != 0:
      orientation = "vertical",
      x_intercept = C/A,
      slope = Undefined,

    IF A = 0 AND B != 0:
      orientation = "horizontal",
      y = C/B,
      slope = 0
  },

  LINEAR_FUNCTION_RELATION: {

    LinearFunction:
      f(x) = m*x + b,

    equation_relation:
      y = f(x),

    properties: [
      constant_rate_of_change,
      straight_line_graph,
      first_degree_polynomial_relation
    ],

    slope:
      m = Δy/Δx,

    intercept:
      b = f(0)
  },

  INTERCEPT_REASONING: {

    x_intercept:
      SET y = 0
      SOLVE for x,

    y_intercept:
      SET x = 0
      SOLVE for y
  },

  PARALLEL_AND_PERPENDICULAR_RELATIONS: {

    ParallelLines:
      m1 = m2
      AND distinct_intercepts,

    CoincidentLines:
      equivalent_equations = TRUE,

    PerpendicularLines:
      m1*m2 = -1
      WHERE slopes_are_defined = TRUE
  },

  SYSTEM_RELATION: {

    SystemOfLinearEquations := {
      members: [LinearEquation_1, ..., LinearEquation_n],
      shared_variables: TRUE
    },

    solution_interpretation:
      "A simultaneous assignment satisfying every equation in the system.",

    geometric_2D_cases: {
      one_solution: "two distinct non-parallel lines intersect once",
      no_solution: "distinct parallel lines",
      infinitely_many_solutions: "coincident lines"
    },

    solution_methods: [
      substitution,
      elimination,
      matrix_reduction,
      graphical_intersection
    ]
  },

  MATRIX_RELATION: {

    equation_system:
      A*x = b,

    entities: {
      A: CoefficientMatrix,
      x: VariableVector,
      b: ConstantVector
    },

    semantic_mapping:
      LinearEquationSystem <-> MatrixEquation
  },

  DOMAIN_AND_RANGE: {

    default_numeric_domain:
      RealNumbers,

    alternate_domains:
      [RationalNumbers, ComplexNumbers],

    constraints:
      domain_restrictions MUST be inherited_from context
  },

  SYMBOLIC_RECOGNITION: {

    ACCEPT_EXAMPLES: [
      "2x + 3 = 9",
      "x - 4 = 0",
      "3x + 2y = 7",
      "y = 5x - 2",
      "4(x + 1) = 2x + 8",
      "ax + b = c where a != 0"
    ],

    REJECT_AS_NONLINEAR: [
      "x^2 + 3 = 0",
      "xy = 5",
      "1/x = 2",
      "sqrt(x) = 4",
      "sin(x) = 0",
      "y = x^3"
    ]
  },

  AMBIGUITY_RESOLUTION: {

    RULE_1:
      IF expression contains powers
      AND all variable powers simplify_to <= 1
      THEN evaluate_after_simplification,

    RULE_2:
      IF variable appears in denominator
      THEN classify_original_form as RationalEquation
      EVEN_IF transformation may produce a linear equation,

    RULE_3:
      IF parameters determine whether leading coefficient equals zero
      THEN classification is conditional_on_parameter_values,

    RULE_4:
      distinguish:
        LinearEquation
        FROM
        equation_whose_solution_method_eventually_becomes_linear
  },

  PARAMETER_REASONING: {

    generic_form:
      a*x + b = c,

    CASE a != 0:
      unique_solution = (c-b)/a,

    CASE a = 0 AND b = c:
      infinite_solutions = TRUE,

    CASE a = 0 AND b != c:
      no_solution = TRUE
  },

  TRANSFORMATION_GRAPH: {

    nodes: [
      OriginalEquation,
      ExpandedEquation,
      SimplifiedEquation,
      CollectedEquation,
      IsolatedVariableEquation,
      Solution,
      VerifiedSolution
    ],

    edges: [
      expand,
      simplify,
      collect_like_terms,
      transpose_terms,
      divide_by_nonzero_coefficient,
      substitute,
      verify
    ],

    invariant:
      solution_set_preserved = TRUE
  },

  ERROR_DETECTION: {

    InvalidDivisionByZero:
      IF transformation divides_by 0
      THEN reject_step,

    EqualityViolation:
      IF operation_applied_to_left != operation_applied_to_right
      THEN reject_step,

    SignError:
      detect incorrect additive_inverse during transposition,

    DistributionError:
      detect malformed multiplication_over_sum,

    LikeTermError:
      detect combination_of_non_like_terms,

    LostSolution:
      compare solution_sets_before_after transformation,

    ExtraneousSolution:
      verify candidate_solution against original_equation
  },

  PROOF_SEMANTICS: {

    solving_as_proof:
      each transformation MUST be justified_by [
        field_axiom,
        equality_property,
        distributive_property,
        additive_inverse,
        multiplicative_inverse,
        algebraic_simplification
      ],

    correctness_condition:
      final_solution_set = original_solution_set
  },

  NATURAL_LANGUAGE_MAPPING: {

    phrase_patterns: {

      "a number plus b equals c":
        x + b = c,

      "a times a number equals c":
        a*x = c,

      "b more than a number":
        x + b,

      "b less than a number":
        x - b,

      "twice a number":
        2*x,

      "the sum of two numbers is c":
        x + y = c
    },

    objective:
      map linguistic relations -> symbolic linear equation
  },

  WORD_PROBLEM_REASONING: {

    PIPELINE:
      1. identify_quantities(),
      2. assign_variables(),
      3. identify_known_constants(),
      4. detect_linear_relationships(),
      5. construct_equation(),
      6. solve_equation(),
      7. verify_against_context(),
      8. interpret_solution_with_units(),

    REQUIRE:
      preserve_units = TRUE,
      preserve_context_constraints = TRUE
  },

  UNITS_AND_DIMENSIONALITY: {

    rule:
      quantities combined by addition/subtraction MUST be dimensionally compatible,

    equality_rule:
      dimension(left_side) = dimension(right_side),

    example:
      distance = speed*time
      MAY form linear equation in distance
      IF speed and time relation is appropriately constrained
  },

  ONTOLOGY_RELATIONS: {

    IS_A: [
      "LinearEquation IS_A Equation",
      "LinearEquation IS_A AlgebraicRelation",
      "SingleVariableLinearEquation IS_A LinearEquation",
      "TwoVariableLinearEquation IS_A LinearEquation",
      "HomogeneousLinearEquation IS_A LinearEquation"
    ],

    PART_OF: [
      "LinearEquation PART_OF Algebra",
      "LinearEquation PART_OF ElementaryAlgebra",
      "LinearEquation PART_OF SystemsOfEquations when grouped"
    ],

    RELATED_TO: [
      "LinearEquation RELATED_TO LinearFunction",
      "LinearEquation RELATED_TO StraightLine",
      "LinearEquation RELATED_TO MatrixEquation",
      "LinearEquation RELATED_TO CoordinateGeometry",
      "LinearEquation RELATED_TO SimultaneousEquations"
    ],

    DEPENDS_ON: [
      "SolvingLinearEquation DEPENDS_ON EqualityProperties",
      "Classification DEPENDS_ON PolynomialDegree",
      "GraphInterpretation DEPENDS_ON CoordinateSystem"
    ]
  },

  SEMANTIC_EQUIVALENCE: {

    objective:
      recognise equations with identical solution sets,

    examples: [
      "2x + 4 = 10 <=> x + 2 = 5",
      "3x = 12 <=> x = 4",
      "2x + 2y = 6 <=> x + y = 3"
    ],

    equivalence_condition:
      SolutionSet(E1) = SolutionSet(E2)
  },

  CONFIDENCE: {

    classification_confidence:
      IF all structural_constraints satisfied
      THEN 1.0
      ELSE IF parameter_dependent
      THEN context_weighted_confidence
      ELSE 0.0,

    solution_confidence:
      IF symbolic_derivation_valid
      AND substitution_verification = TRUE
      THEN 1.0,

    semantic_mapping_confidence:
      based_on [
        variable_identification,
        relation_detection,
        unit_consistency,
        contextual_consistency
      ]
  },

  AI_CONSUMPTION: {

    machine_tasks: [
      recognise_linear_equation,
      extract_variables,
      extract_coefficients,
      classify_equation,
      normalise_equation,
      solve_equation,
      verify_solution,
      generate_equivalent_forms,
      map_to_graph,
      map_to_linear_function,
      compare_solution_sets,
      detect_invalid_reasoning,
      explain_steps,
      translate_word_problem_to_equation,
      connect_equation_to_systems_and_matrices
    ],

    preferred_representation:
      structured_symbolic_semantic_graph,

    reasoning_mode:
      recursive_constraint_preserving_transformation
  },

  RECURSIVE_REASONING: {

    FUNCTION SolveLinearEquation(E):

      IF not IsEquation(E):
        RETURN TypeError,

      E1 := Parse(E),
      E2 := Simplify(E1),

      IF not IsLinear(E2):
        RETURN RedirectToAppropriateOntology(E2),

      classification := ClassifyLinearEquation(E2),

      CASE classification OF:

        IdentityEquation:
          RETURN Domain,

        ContradictoryEquation:
          RETURN EmptySet,

        SingleVariableLinearEquation:
          candidate := IsolateVariable(E2),
          verified := Verify(candidate, E),
          RETURN candidate IF verified ELSE ReasoningError,

        MultiVariableLinearEquation:
          RETURN ParametricOrGeometricRepresentation(E2),

        OTHERWISE:
          RETURN ContextDependentResult
  },

  RECURSIVE_COHERENCE: {

    invariant_1:
      ontology_definition_consistent_with_polynomial_degree = TRUE,

    invariant_2:
      algebraic_transformations_preserve_solution_set = TRUE,

    invariant_3:
      graph_representation_preserves_equation_semantics = TRUE,

    invariant_4:
      natural_language_mapping_preserves_quantitative_relation = TRUE,

    invariant_5:
      classification_remains_consistent_across_equivalent_forms = TRUE
  },

  FLOW_HASH: {

    semantic_signature_inputs: [
      ontology_name,
      canonical_definition,
      structural_constraints,
      relation_graph,
      transformation_rules,
      solution_semantics,
      verification_rules
    ],

    hash_purpose:
      "Detect semantic drift between revisions of the ontology.",

    expected_property:
      same_semantic_model -> stable_equivalent_signature
  },

  UPDATE_MODEL: {

    version: "1.0",

    update_policy:
      additions MAY extend examples, relationships, or reasoning rules
      PROVIDED core mathematical invariants remain unchanged,

    immutable_constraints: [
      degree_constraint,
      equality_preservation,
      nonzero_division_constraint,
      solution_verification_requirement
    ],

    revision_trigger: [
      semantic_conflict_detected,
      ontology_parent_updated,
      new_relation_required,
      representation_standard_changed
    ]
  },

  QUERY_INTERFACE: {

    QUERY "Is this a linear equation?":
      RETURN classification + evidence,

    QUERY "Solve":
      RETURN normalised_steps + solution + verification,

    QUERY "Why is it linear?":
      RETURN degree_analysis + variable_interaction_analysis,

    QUERY "Give equivalent form":
      RETURN transformed_equation + equivalence_justification,

    QUERY "Graph meaning":
      RETURN slope + intercepts + orientation + geometric_entity,

    QUERY "Compare two equations":
      RETURN [
        structural_similarity,
        semantic_equivalence,
        solution_set_relation,
        graph_relation
      ]
  },

  EXAMPLE_REASONING_1: {

    input:
      3*x + 5 = 20,

    parse:
      coefficient = 3,
      variable = x,
      constant_left = 5,
      constant_right = 20,

    transform:
      3*x + 5 = 20
      => 3*x = 15
      => x = 5,

    verify:
      3*(5) + 5 = 20
      => 20 = 20,

    output:
      SolutionSet = {5}
  },

  EXAMPLE_REASONING_2: {

    input:
      2*x + 4 = 2*(x + 2),

    simplify:
      2*x + 4 = 2*x + 4,

    reduce:
      0 = 0,

    classification:
      IdentityEquation,

    output:
      SolutionSet = Domain
  },

  EXAMPLE_REASONING_3: {

    input:
      2*x + 4 = 2*x + 7,

    subtract:
      2*x from both sides,

    reduce:
      4 = 7,

    classification:
      ContradictoryEquation,

    output:
      SolutionSet = EmptySet
  },

  EXAMPLE_REASONING_4: {

    input:
      2*x + 3*y = 6,

    graph_form:
      y = (-2/3)*x + 2,

    graph_semantics:
      slope = -2/3,
      y_intercept = 2,
      x_intercept = 3,

    output:
      StraightLine
  },

  CROSS_ONTOLOGY_LINKS: {

    EquationOntology:
      relation = parent,

    PolynomialOntology:
      relation = "linear equation contains polynomial expressions of degree <= 1",

    MonomialOntology:
      relation = "variable terms may be first-degree monomials",

    AlgebraicExpressionOntology:
      relation = "equation sides are algebraic expressions",

    LinearFunctionOntology:
      relation = "two-variable linear equations can define linear/affine functions",

    CoordinateGeometryOntology:
      relation = "two-variable linear equations represent straight lines",

    MatrixOntology:
      relation = "systems of linear equations admit matrix representation",

    VectorOntology:
      relation = "multi-variable linear equations define affine hyperplanes",

    InequalityOntology:
      relation = "shares transformation principles but differs in order relation"
  },

  KNOWLEDGE_GRAPH: {

    nodes: [
      LinearEquation,
      Equation,
      AlgebraicExpression,
      Variable,
      Coefficient,
      Constant,
      Equality,
      Solution,
      SolutionSet,
      LinearFunction,
      StraightLine,
      Slope,
      Intercept,
      SystemOfLinearEquations,
      MatrixEquation
    ],

    edges: [
      LinearEquation -> IS_A -> Equation,
      LinearEquation -> HAS_PART -> AlgebraicExpression,
      LinearEquation -> HAS_VARIABLE -> Variable,
      LinearEquation -> HAS_COEFFICIENT -> Coefficient,
      LinearEquation -> USES -> Equality,
      LinearEquation -> HAS_SOLUTION_SET -> SolutionSet,
      TwoVariableLinearEquation -> REPRESENTS -> StraightLine,
      StraightLine -> HAS_PROPERTY -> Slope,
      StraightLine -> HAS_PROPERTY -> Intercept,
      SystemOfLinearEquations -> CONTAINS -> LinearEquation,
      SystemOfLinearEquations -> REPRESENTABLE_AS -> MatrixEquation
    ]
  },

  TERMINATION_CONDITION: {
    ontology_complete_when: [
      entity_defined = TRUE,
      structural_constraints_defined = TRUE,
      classifications_defined = TRUE,
      transformations_defined = TRUE,
      solution_semantics_defined = TRUE,
      verification_defined = TRUE,
      graph_relations_defined = TRUE,
      cross_ontology_relations_defined = TRUE,
      ai_consumption_model_defined = TRUE,
      recursive_coherence_verified = TRUE
    ]
  }

}

EXECUTE Linear_Equation_Ontology_v1.0:

  INPUT:
    mathematical_entity_or_query

  PIPELINE:
    Parse
    -> IdentifyEntity
    -> ValidateStructure
    -> Classify
    -> Normalise
    -> ApplyLinearReasoning
    -> PreserveEquality
    -> DeriveSolutionOrRepresentation
    -> Verify
    -> LinkRelatedOntologies
    -> AssignConfidence
    -> EmitSemanticResult

  OUTPUT:
    {
      entity,
      classification,
      canonical_form,
      variables,
      coefficients,
      constants,
      solution_set,
      transformations,
      verification,
      graph_semantics,
      ontology_relations,
      confidence,
      semantic_equivalence,
      flow_hash
    }

END FLOW Linear_Equation_Ontology_v1.0
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ