Need example of a finite noncommutative ring with inverses

107 Views Asked by At

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

  1. a commutative ring with identity,
  2. having distinct multiplicative and additive identities,
  3. for which all non-zero elements have inverses
1

There are 1 best solutions below

2
On

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.