Class SquareMatrices<E>
- Type Parameters:
E- the type of scalar elements in the field
- All Implemented Interfaces:
AbelianGroup<Matrix<E>>, AbelianMonoid<Matrix<E>>, Group<Matrix<E>>, Magma<Matrix<E>>, Monoid<Matrix<E>>, Ring<Matrix<E>>, Semiring<Matrix<E>>, Set<Matrix<E>>
For a given field F and dimension n, the set of n×n matrices forms a ring under matrix addition and multiplication. Unlike scalar rings, matrix multiplication is generally not commutative.
Mathematical Properties
- Addition: closed, associative, commutative, with zero matrix
- Multiplication: closed, associative, with identity matrix
- Distributive: A(B + C) = AB + AC
- Non-commutative: AB ≠BA in general
- Since:
- 1.0
- Author:
- Gemini AI (Google DeepMind)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the sum of two elements (additive notation).booleanTests whether this set contains the specified element.Returns a human-readable description of this set.intReturns the inverse of the given element.booleanisEmpty()Returnstrueif this set contains no elements.booleanTests whether multiplication is commutative in this semiring.Returns the product of two elements.Returns the additive inverse (negation) of an element.static <E> SquareMatrices<E> Returns the SquareMatrices structure for n×n matrices over a field.one()Returns the multiplicative identity (one element).Performs the binary operation on two elements.toString()zero()Returns the additive identity (zero element).Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface AbelianGroup
isCommutative, subtractMethods inherited from interface AbelianMonoid
identity, isCommutativeMethods inherited from interface Monoid
isAssociative
-
Method Details
-
of
Returns the SquareMatrices structure for n×n matrices over a field. -
getDimension
public int getDimension() -
getScalarField
-
operate
Description copied from interface:MagmaPerforms the binary operation on two elements.This is the fundamental operation of a magma. The result must be an element of this magma (closure property).
Properties: None required (not necessarily associative or commutative)
-
add
Description copied from interface:AbelianMonoidReturns the sum of two elements (additive notation).Delegates to
Magma.operate(Object, Object).- Specified by:
addin interfaceAbelianMonoid<E>- Parameters:
a- the first addendb- the second addend- Returns:
- a + b
-
zero
Description copied from interface:AbelianMonoidReturns the additive identity (zero element).Delegates to
AbelianMonoid.identity().- Specified by:
zeroin interfaceAbelianMonoid<E>- Returns:
- the zero element
-
negate
Description copied from interface:AbelianGroupReturns the additive inverse (negation) of an element.Satisfies: a + (-a) = (-a) + a = 0
- Specified by:
negatein interfaceAbelianGroup<E>- Parameters:
element- the element to negate- Returns:
- -element
- See Also:
-
multiply
Description copied from interface:SemiringReturns the product of two elements.Multiplication must be associative and distribute over addition.
-
one
-
isMultiplicationCommutative
public boolean isMultiplicationCommutative()Description copied from interface:SemiringTests whether multiplication is commutative in this semiring.- Specified by:
isMultiplicationCommutativein interfaceSemiring<E>- Returns:
trueif multiplication commutes
-
inverse
Description copied from interface:GroupReturns the inverse of the given element.For element a, returns a⻹ such that: a ∗ a⻹ = a⻹ ∗ a = e (identity).
-
contains
Description copied from interface:SetTests whether this set contains the specified element.This is the fundamental operation of a set - membership testing.
-
isEmpty
-
description
Description copied from interface:SetReturns a human-readable description of this set.Examples:
- "â„ (Real Numbers)"
- "ℤ/12ℤ (Integers modulo 12)"
- "{1, 2, 3, 4, 5}"
- Specified by:
descriptionin interfaceSet<E>- Returns:
- a description of this set
-
toString
-