Interface Ring<E>

All Superinterfaces:
AbelianGroup<E>, AbelianMonoid<E>, Group<E>, Magma<E>, Monoid<E>, Semiring<E>, Set<E>
All Known Subinterfaces:
Algebra<E,F>, BanachAlgebra<E,F>, CStarAlgebra<E,F>, DivisionRing<E>, Field<E>, GradedAlgebra<E,F>, LieAlgebra<E,S>, Matrix<E>
All Known Implementing Classes:
CliffordAlgebra, Complex, Complexes, DenseMatrix, DoubleField, GenericMatrix, Integer, Integers, MatrixLieAlgebra, MMapMatrix, NativeRealBig, NativeRealDoubleMatrix, NativeRealFloatMatrix, Octonion, Octonions, PolynomialRing, Quaternion, Quaternions, Rational, Rationals, Real, RealBig, RealDouble, RealDoubleMatrix, RealFloat, Reals, SIMDRealDoubleMatrix, SIMDRealFloatMatrix, SparseMatrix, SquareMatrices, TiledMatrix

public interface Ring<E> extends AbelianGroup<E>, Semiring<E>
A ring is an abelian group with a second binary operation (multiplication).

Rings are fundamental algebraic structures that generalize arithmetic. They appear throughout mathematics, from number theory to algebraic geometry.

Mathematical Definition

A ring (R, +, ×) consists of:

  1. A set R
  2. An addition operation + making (R, +) an abelian group
  3. A multiplication operation × satisfying:
    • Closure: ∀ a, b ∈ R: a × b ∈ R
    • Associativity: (a × b) × c = a × (b × c)
    • Distributivity: a × (b + c) = (a × b) + (a × c) and (a + b) × c = (a × c) + (b × c)

Examples

  • (ℤ, +, ×) - Integers (commutative ring with unity)
  • (ℝ, +, ×) - Real numbers (field, thus also a ring)
  • (Mâ‚‚(ℝ), +, ×) - 2×2 real matrices (non-commutative ring)
  • (ℤ/nℤ, +, ×) - Integers modulo n
  • (ℝ[x], +, ×) - Polynomials with real coefficients

Special Types of Rings

  • Commutative Ring: Multiplication commutes (a × b = b × a)
  • Ring with Unity: Has multiplicative identity (1)
  • Integral Domain: Commutative ring with unity, no zero divisors
  • Division Ring: Every non-zero element has multiplicative inverse
  • Field: Commutative division ring

Usage

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Details

    • hasUnity

      default boolean hasUnity()
      Tests whether this ring has a multiplicative identity.

      Since this interface extends Semiring, it is generally expected to have unity. However, some definitions of Ring do not require it (Rng).

      Returns:
      true if this ring has unity (element 1)
      See Also: