I'm trying to write some test cases for set of code, and I need an example of a finite ring (with identity) which is not commutative, but has inverses (for non-zero elements) and whose additive identity is distinct from its multiplicative identity.
The reason I need this is because I had some code to detect a finite field which was passing all my test cases, yet I was not checking whether the multiplication is commutative. Having such a test case would make my code more robust.
My test for field is that the set be
- a commutative ring with identity,
- having distinct multiplicative and additive identities,
- for which all non-zero elements have inverses
A ring is called a division ring if any non-zero element is invertible. A field is a commutative division ring.
So what you are asking for is a finite division ring which is not a field. Actually such an example does not exist beacuse any finite division ring is a field.