0

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
rschwieb
  • 153,510
  • 4
    Actually, such an example does not exist because any finite division ring is a field. – Temoi Jan 15 '24 at 10:42
  • I've tried to post it as an answer, I don't know why it is automatically converted to a comment. – Temoi Jan 15 '24 at 10:43
  • Perhaps, Matteo, it doesn't have enough characters for the software to accept it as an answer. Try expanding on it a little, and then posting it. (You aren't under an answer ban, are you?) – Gerry Myerson Jan 15 '24 at 12:04
  • @GerryMyerson Thanks, I'll follow your advice (no, I'm not under an answer ban) – Temoi Jan 15 '24 at 13:12
  • 1
    Hello Jim: with exceedingly few exceptions, rings in which multiplication is commutative are called commutative and not Abelian. I realize this doesn't quite line up with what groups do. Actually the adjective abelian is used for a different condition in rings. At any rate, using commutative instead will help others with the same question find the solutions here. – rschwieb Jan 15 '24 at 15:44

1 Answers1

5

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.

Temoi
  • 1,287