Skip to content

keithallatt/mathematics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 

Repository files navigation

mathematics

Mathematics related structures written in Java

Fractions

Fractions, (equiv. Rational Numbers, q ∈ ℚ) are the set of all numbers q = a / b, for a and b in the integers, b ≠ 0. Binary operations include addition, subtraction, multiplication, division. Exponentiation is defined for a rational base and integer power. The unary operation, the reciprocal, is defined for all non-zero rational numbers.

Complex Numbers

Complex numbers, one of three hypercomplex number systems, are an extension of the real numbers, (z ∈ ℂ = ℝ + ℝi) by adjoining the imaginary unit i, where i2 = -1.

Dual Numbers

Dual numbers, one of three hypercomplex number systems, are an extension of the real numbers, (ℝ + ℝε) by adjoining the dual unit ε, where ε2 = 0.

Hyperbolic Numbers

Hyperbolic numbers, one of three hypercomplex number systems, are an extension of the real numbers, (ℝ + ℝj) by adjoining the hyperbolic unit j, where j2 = 1.

Quaternions

Quaternions, often denoted as, h = a + bi + cj + dk ∈ ℍ, where i, j, and k are unit vectors in ℝ3. This is often described as an extension of the complex numbers (ℍ = ℂ + ℂj) because taking complex numbers z1 = a+bi and z2 = c+di, (a+bi) + (c+di)j = a+bi + cj + dij = a+bi + cj + dk.

This can also be redefined in terms of a scalar added to a vector in ℝ3:

a + bi + cj + dk = r + v⃗, s.t. r = a, v⃗ = bi + cj + dk.

The definition for Quaternion addition via the scalar and vector method is:

(r1, v⃗1) + (r2, v⃗2) = (r1 + r2, v⃗1 + v⃗2)

The definition for Quaternion multiplication via the scalar and vector method is:

(r1, v⃗1)(r2, v⃗2) = (r1r2 - v⃗1 ⋅ v⃗2, r1v⃗2 + r2v⃗1 + v⃗1 ⨯ v⃗2)

The definition for Quaternion reciprocation via the scalar and vector method is:

(r, v⃗)-1 = (r / (r2 + v⃗ ⋅ v⃗), -v⃗ / (r2 + v⃗ ⋅ v⃗))

Matrices

Matrices are 2-dimensional grids of numbers. These are often used for linear transformations from ℝm to ℝn, where the matrix is n by m in size. Square matrices have special properties, such as the existence of the determinant, and in special cases, can be deemed invertible (determinant ≠ 0) or nilpotent (mn = 0 for some n, m ∈ M, n ∈ ℕ). These can also be used to solve systems of linear equations.

Vectors

Vectors represent points, directions and other components in n-space (n being the dimension of the vector). These can be thought of as column matrices, or a m by 1 matrix. These are used primarily as a tool to describe a direction with a particular magnitude. Various other operations are defined for vectors, such as inner and outer products, or cross products.

Operations

Structure Add. Sub. Mult. Div. Non-Int Pow Exponent
Real (double) Yes Yes Yes Yes Yes Yes
Fraction Yes Yes Yes Yes No No
Complex Yes Yes Yes Yes Yes Yes
Dual Yes Yes Yes Yes Yes Yes
Hyperbolic Yes Yes Yes Yes Yes Yes
Quaternions Yes Yes Yes Yes No No
Matrices Yes Yes Yes No Sometimes1 Sometimes2
Vectors Yes Yes Yes No No No

1 Matrix must have non-zero determinant.

2 Matrix must be nilpotent (mn = 0 for some n, m ∈ M, n ∈ ℕ) or diagonalizable (M = PDP-1 for some P and D diagonal).

About

Mathematics related structures written in Java

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages