Skip to main content

Affine Transformation Ontology

Transformational 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 affine transformation within the Kireth Research Semantic Library. An affine transformation is a geometric mapping of the form T(x)=A*x+b that preserves affine combinations, lines, collinearity, parallelism and ratios along a line. This ontology supports linear parts, translations, matrices, determinants, invertibility, fixed points, images and preimages, composition, affine invariants, barycentric coordinates, dimensional scaling and relationships with linear, similarity and projective transformations.

FLOW_ALGEBRA_RECORD {

METADATA {
 FLOW_NAME = "Affine Transformation Ontology 2"
 FLOW_TYPE = "Mathematical Ontology"
 DOMAIN = "Mathematics"
 SUBDOMAIN = "Geometry"
 SPECIALISATION = "Transformational Geometry / Affine Geometry"
 CANONICAL_PAGE = "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/geometry-ontologies/transformational-geometry/affine-transformation-ontology-2.html"
 LANGUAGE = "en-GB"
 VERSION = "1.0"
 STATUS = "active"
}

IDENTITY {
 PRIMARY_ENTITY = AffineTransformation
 SYMBOLIC_FORMS = [
  "T(x)=A*x+b",
  "x' = A*x+b"
 ]
 ENTITY_CLASS = GeometricTransformation
 PRIMARY_CONTEXT = TransformationalGeometry
 DEFINITION = "An affine transformation is a mapping composed of a linear transformation followed by a translation, expressible as T(x)=A*x+b."
 SEMANTIC_ROLE = "Provides the general line-preserving geometric framework for translation, rotation, scaling, shear, affine coordinates, barycentric relations and determinant-based measurement scaling."
}

SCOPE {
 INCLUDE = [
  AffineTransformation,
  LinearPart,
  TranslationPart,
  AffineMap,
  InvertibleAffineTransformation,
  SingularAffineTransformation,
  AffineCombination,
  BarycentricCoordinates,
  Image,
  Preimage,
  FixedPoint,
  FixedSet,
  Composition,
  Inverse,
  MatrixRepresentation,
  HomogeneousCoordinates,
  Determinant,
  Jacobian,
  CollinearityInvariant,
  ParallelismInvariant,
  RatioInvariant
 ]

 EXCLUDE_AS_PRIMARY = [
  PurelyProjectiveTransformationWithoutAffineChart,
  ArbitraryNonlinearTransformation,
  TopologicalMapWithoutAffineStructure
 ]

 DISAMBIGUATION_RULE =
  "When a geometric mapping has form A*x+b or preserves affine combinations, straight lines, collinearity and parallelism, interpret it as an affine transformation."
}

CORE_CONCEPTS {

 AffineTransformation {
  definition = "A map T(x)=A*x+b where A is linear and b is a translation vector."
 }

 LinearPart {
  symbol = "A"
  definition = "The linear component controlling direction, scaling, rotation, reflection, shear and rank."
 }

 TranslationPart {
  symbol = "b"
  definition = "The constant displacement component."
 }

 AffineCombination {
  definition = "A weighted sum sum(alpha_i*x_i) with sum(alpha_i)=1."
 }

 BarycentricCoordinates {
  definition = "Affine-coordinate weights expressing a point relative to reference points whose coefficients sum to one."
 }

 InvertibleAffineTransformation {
  definition = "An affine transformation whose linear part A is nonsingular."
  condition = "det(A)!=0"
 }

 SingularAffineTransformation {
  definition = "An affine transformation whose linear part is singular and lowers dimension."
  condition = "det(A)=0"
 }

 FixedPoint {
  definition = "A point x satisfying A*x+b=x."
 }

 HomogeneousCoordinates {
  definition = "An augmented-coordinate representation in which affine maps become matrix multiplications."
 }

 Determinant {
  definition = "A scalar of the linear part controlling invertibility, orientation and volume scaling."
 }
}

RELATIONS {
 AffineTransformation --is_special_case_of--> GeometricTransformation
 AffineTransformation --has--> LinearPart
 AffineTransformation --has--> TranslationPart
 LinearTransformation --is_special_case_of--> AffineTransformation WHEN b=0
 Translation --is_special_case_of--> AffineTransformation WHEN A=I
 Rotation --is_special_case_of--> AffineTransformation
 Reflection --is_special_case_of--> AffineTransformation
 Scaling --is_special_case_of--> AffineTransformation
 ShearTransformation --is_special_case_of--> AffineTransformation
 AffineTransformation --preserves--> Lines
 AffineTransformation --preserves--> Collinearity
 AffineTransformation --preserves--> Parallelism
 AffineTransformation --preserves--> AffineCombinations
 AffineTransformation --preserves--> RatiosAlongSameLine
 InvertibleAffineTransformation --preserves--> Dimension
 SingularAffineTransformation --can_reduce--> Dimension
 Determinant --controls--> Invertibility
 Determinant --controls--> Orientation
 Determinant --controls--> VolumeScaling
}

OPERATORS {
 APPLY_AFFINE(A,b,x) :=
  A*x+b

 COMPOSE_AFFINE(A2,b2,A1,b1) :=
  (
   A=A2*A1,
   b=A2*b1+b2
  )

 INVERSE_AFFINE(A,b) :=
  (
   A_inverse=A^-1,
   b_inverse=-A^-1*b
  )
  WHEN det(A)!=0

 FIXED_POINTS(A,b) :=
  solve((I-A)x=b)

 IMAGE_OF_LINE(T,L) :=
  affine_image_of_line(L)

 IMAGE_OF_AFFINE_COMBINATION(T,{alpha_i,x_i}) :=
  sum(alpha_i*T(x_i))
  WHEN sum(alpha_i)=1

 VOLUME_SCALE(A) :=
  abs(det(A))

 ORIENTATION_SIGN(A) :=
  sign(det(A))

 RANK(A) :=
  matrix_rank(A)
}

DEFINITIONS {
 D1 = "An affine transformation has form T(x)=A*x+b."
 D2 = "Affine transformations map lines to lines or lower-dimensional affine sets."
 D3 = "Affine transformations preserve collinearity."
 D4 = "Affine transformations preserve parallelism when images remain nondegenerate."
 D5 = "Affine transformations preserve affine combinations."
 D6 = "Ratios along a common line are preserved by invertible affine maps."
 D7 = "An affine transformation is invertible iff its linear part is invertible."
 D8 = "The determinant of A gives oriented volume scale."
 D9 = "A negative determinant reverses orientation."
 D10 = "A zero determinant indicates dimension collapse."
}

AXIOMS {
 A1_AFFINE_FORM:
  Every affine transformation can be written T(x)=A*x+b

 A2_AFFINE_COMBINATION:
  T(sum(alpha_i*x_i))=sum(alpha_i*T(x_i))
  whenever sum(alpha_i)=1

 A3_LINE_PRESERVATION:
  Affine transformations map affine lines to affine lines or degenerate points

 A4_PARALLELISM:
  Invertible affine transformations preserve parallelism

 A5_INVERTIBILITY:
  T is invertible iff det(A)!=0

 A6_COMPOSITION:
  Composition of affine transformations is affine

 A7_INVERSE_CLOSURE:
  The inverse of an invertible affine transformation is affine

 A8_MEASURE_SCALING:
  n-dimensional volume scales by abs(det(A)) in n dimensions
}

REASONING {

 R1_CLASSIFY_AFFINE {
  INPUT = transformation_rule
  TEST = can_be_expressed_as_Ax_plus_b
  IF true
   RETURN AffineTransformation
  ELSE
   RETURN NotEstablishedAffine
 }

 R2_IMAGE {
  INPUT = [A,b,x_or_object]
  APPLY = A*x+b
  RETURN = image
 }

 R3_COMPOSITION {
  INPUT = [A1,b1,A2,b2]
  COMPUTE = A2*A1
  COMPUTE = A2*b1+b2
  RETURN = composite_affine_map
 }

 R4_INVERSE {
  INPUT = [A,b]
  COMPUTE = det(A)
  IF det(A)!=0
   RETURN x=A^-1*(y-b)
  ELSE
   RETURN NoninvertibleAffineMap
 }

 R5_FIXED_POINTS {
  INPUT = [A,b]
  SOLVE = (I-A)x=b
  CLASSIFY = none_unique_line_plane_or_higher_dimensional_affine_fixed_set
  RETURN = fixed_set
 }

 R6_INVARIANTS {
  INPUT = affine_map
  RETURN = [
   collinearity_preserved,
   parallelism_preserved_when_invertible,
   affine_ratios_preserved,
   barycentric_coordinates_preserved,
   lengths_not_generally_preserved,
   angles_not_generally_preserved
  ]
 }

 R7_DETERMINANT_REASONING {
  INPUT = A
  COMPUTE = det(A)
  IF det(A)==0
   RETURN singular_dimension_reducing_map
  ELSE
   RETURN [
    invertible=true,
    orientation=sign(det(A)),
    volume_scale=abs(det(A))
   ]
 }

 R8_BARYCENTRIC_REASONING {
  INPUT = point_as_affine_combination
  APPLY = T_to_reference_points
  KEEP = same_coefficients
  RETURN = transformed_barycentric_relation
 }

 R9_HOMOGENEOUS_MATRIX {
  INPUT = [A,b]
  BUILD = block_matrix([[A,b],[0,...,0,1]])
  RETURN = homogeneous_affine_representation
 }
}

CONSTRAINTS {
 C1 = "Affine transformations do not generally preserve distances."
 C2 = "Affine transformations do not generally preserve angles."
 C3 = "Parallelism guarantees require attention to singular collapse."
 C4 = "Ratios are preserved along the same affine line, not arbitrary Euclidean length ratios."
 C5 = "The determinant refers to the linear part A."
 C6 = "Zero determinant means no affine inverse exists."
 C7 = "Coordinate matrix representations depend on the chosen basis and origin."
 C8 = "Projective transformations are more general and need not preserve parallelism."
}

SEMANTIC_EQUIVALENCE {
 "AffineTransformation" <=> "LinearMapPlusTranslation"
 "AffineMap" <=> "AxPlusBTransformation"
 "InvertibleAffineTransformation" <=> "AffineMapWithNonsingularLinearPart"
 "SingularAffineTransformation" <=> "AffineMapWithSingularLinearPart"
 "AffineCombinationPreservation" <=> "BarycentricWeightPreservation"
}

VALIDATION {
 V1 = "Map has form A*x+b."
 V2 = "Composition yields A2*A1 and A2*b1+b2."
 V3 = "Inverse exists iff det(A)!=0."
 V4 = "Affine combinations are preserved."
 V5 = "Lines map to lines or degenerate affine sets."
 V6 = "Invertible affine maps preserve parallelism."
 V7 = "Volume scale equals abs(det(A))."
 V8 = "Orientation follows sign(det(A))."
 V9 = "Singular maps may reduce dimension."
}

CONFIDENCE {
 BASE_CONFIDENCE = 0.99
 AFFINE_DEFINITION = 0.99
 COMPOSITION_REASONING = 0.99
 INVERSE_REASONING = 0.99
 INVARIANT_REASONING = 0.99
 DETERMINANT_REASONING = 0.99
 BARYCENTRIC_REASONING = 0.98
 FIXED_POINT_REASONING = 0.98

 POLICY =
  "Reduce confidence when coordinate basis, matrix dimensions, singularity, transformation order, affine chart or target dimension are underspecified."
}

AI_CONSUMPTION {
 PURPOSES = [
  SemanticSearch,
  OntologyGrounding,
  AffineReasoning,
  TransformationReasoning,
  LinearTransformationReasoning,
  CoordinateReasoning,
  MatrixReasoning,
  DeterminantReasoning,
  FixedPointReasoning,
  BarycentricReasoning,
  VolumeScalingReasoning,
  KnowledgeGraphConstruction,
  RetrievalAugmentation,
  RecursiveInference
 ]

 NORMALISE {
  "affine transformation" -> AffineTransformation
  "affine map" -> AffineTransformation
  "Ax+b" -> AffineTransformation
  "linear part" -> LinearPart
  "translation part" -> TranslationPart
  "invertible affine map" -> InvertibleAffineTransformation
  "singular affine map" -> SingularAffineTransformation
 }

 INTERPRETATION_ORDER = [
  detect_affine_transformation_context,
  identify source_target_dimensions,
  identify matrix_A_and_vector_b,
  test determinant_rank_and_invertibility,
  identify image_inverse_composition_fixed_point_invariant_or_measure_scaling goal,
  perform affine_specific reasoning,
  verify basis_dimension_singularity_and_order constraints,
  return semantic output
 ]
}

EXECUTION_RULES {
 E1:
  IF query_mentions("affine transformation")
  OR rule_matches_Ax_plus_b
  THEN activate(AffineTransformationOntology2)

 E2:
  IF image_requested
  THEN compute A*x+b

 E3:
  IF composition_requested
  THEN use A2*A1 and A2*b1+b2

 E4:
  IF inverse_requested
  THEN require det(A)!=0
  AND use A^-1 and -A^-1*b

 E5:
  IF fixed_points_requested
  THEN solve (I-A)x=b

 E6:
  IF volume_or_area_scale_requested
  THEN use abs(det(A)) in matching dimension

 E7:
  IF orientation_requested
  THEN use sign(det(A))

 E8:
  IF determinant_zero
  THEN classify singular
  AND permit dimension_reduction

 E9:
  IF barycentric_or_affine_combination_context
  THEN preserve coefficients summing to one
}

RECURSION {
 ENTRY = AffineTransformation

 EXPAND(AffineTransformation) -> [
  LinearPart,
  TranslationPart,
  Image,
  Preimage,
  Composition,
  Inverse,
  FixedPoint,
  AffineCombination,
  BarycentricCoordinates,
  Determinant,
  Rank,
  HomogeneousCoordinates,
  Invariant
 ]

 EXPAND(LinearPart) -> [
  Rotation,
  Reflection,
  Scaling,
  ShearTransformation,
  Rank,
  Determinant,
  Eigenstructure
 ]

 EXPAND(AffineInvariants) -> [
  Line,
  Collinearity,
  Parallelism,
  AffineRatio,
  BarycentricCoordinates,
  ConvexityUnderInvertibleMaps
 ]

 EXPAND(HomogeneousCoordinates) -> [
  AugmentedMatrix,
  TranslationEncoding,
  CompositionByMatrixMultiplication
 ]

 STOP_CONDITION =
  "Stop when the affine map's linear and translation parts, image, inverse, composition, fixed set, determinant, invariants, barycentric relation or measure scaling property is sufficiently resolved."
}

ROUTING {
 PARENT_ONTOLOGY = "Transformational Geometry"

 IMMEDIATE_CONTEXTS = [
  "Transformation Ontology 2",
  "Linear Transformation Ontology",
  "Scaling Ontology",
  "Shear Transformation Ontology"
 ]

 RELATED_ONTOLOGIES = [
  "Transformational Geometry",
  "Transformation Ontology 2",
  "Translation Ontology",
  "Rotation Ontology",
  "Reflection Ontology",
  "Scaling Ontology",
  "Shear Transformation Ontology",
  "Coordinate Geometry Ontology",
  "Vector Geometry Ontology",
  "Linear Transformation Ontology",
  "Matrix Ontology",
  "Determinant Ontology",
  "Rank Ontology"
 ]

 ROUTE_RULES = [
  "Affine Transformation Ontology 2 -> Transformation Ontology 2 for general mapping semantics",
  "Affine Transformation Ontology 2 -> Linear Transformation for the linear part A",
  "Affine Transformation Ontology 2 -> Translation for the vector b",
  "Affine Transformation Ontology 2 -> Scaling or Shear for specific matrix structures",
  "Affine Transformation Ontology 2 -> Coordinate Geometry for coordinate equations",
  "Affine Transformation Ontology 2 -> Matrix for computational representation",
  "Affine Transformation Ontology 2 -> Determinant and Rank for invertibility and dimension",
  "Affine Transformation Ontology 2 -> Vector Geometry for affine-subspace reasoning"
 ]
}

UPDATE_MODEL {
 MODE = "append-compatible semantic versioning"

 MAJOR = "ontology-breaking conceptual change"
 MINOR = "new compatible affine classes, invariants, representations or reasoning pathways"
 PATCH = "clarification, metadata or formatting correction"

 RULES = [
  "Preserve T(x)=A*x+b semantics.",
  "Preserve affine-combination invariance.",
  "Preserve determinant-based invertibility.",
  "Preserve composition and inverse formulas.",
  "Preserve distinction between metric and affine invariants.",
  "Preserve singular-map dimension reduction.",
  "Preserve machine-readable affine-transformation semantics."
 ]
}

OUTPUT {
 CANONICAL_DEFINITION =
  "An affine transformation is a mapping T(x)=A*x+b consisting of a linear transformation followed by a translation."

 GENERAL_FORM_SUMMARY =
  "T(x)=A*x+b"

 COMPOSITION_SUMMARY =
  "T2∘T1 has linear part A2*A1 and translation part A2*b1+b2."

 INVERSE_SUMMARY =
  "If det(A)!=0, T^-1(y)=A^-1(y-b)."

 FIXED_POINT_SUMMARY =
  "Fixed points satisfy (I-A)x=b."

 DETERMINANT_SUMMARY =
  "det(A)!=0 iff the affine map is invertible; |det(A)| gives n-dimensional volume scale."

 INVARIANT_SUMMARY =
  "Affine transformations preserve lines, collinearity, affine combinations and, when invertible, parallelism and ratios along lines."
}

FLOW {
 INPUT
 -> detect_affine_transformation_context
 -> identify matrix_A_translation_b_source_and_target_dimensions
 -> compute determinant_rank_and_invertibility
 -> identify image_inverse_composition_fixed_point_affine_combination_measure_scaling_or_invariant goal
 -> perform affine_specific reasoning
 -> verify coordinate_basis_dimension_singularity_and_transformation_order constraints
 -> identify preserved_affine_structure_and_changed_metric_properties
 -> route to transformation linear translation scaling shear coordinate vector matrix determinant or rank ontology
 -> recursively_expand_required_dependencies
 -> verify_result
 -> assign_confidence
 -> produce_semantic_output
 -> END
}

SEMANTIC_SUMMARY {
 "The Affine Transformation Ontology 2 defines mappings of the form T(x)=A*x+b and organises their geometry around linear and translation components, affine-combination preservation, composition, inverses, fixed sets, determinants, rank, barycentric coordinates, measure scaling and affine invariants. It explicitly distinguishes affine structure from metric structure and handles both invertible and dimension-reducing cases."
}

FLOW_HASH {
 METHOD = "semantic-content-identity"
 ID = "KIRETH-MATH-GEOMETRY-AFFINE-TRANSFORMATION-ONTOLOGY-2-V1"
}

}

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