Ring Theory
Ring Theory
kill(all)$
load(functs)$
makearray(z,6)$
z:[0,1,2,3,4,5]$
Z:setify(z);
addmod(x,y):=mod(x+y,6)$
multmod(x,y):=mod(x*y,6)$
n:length(z)$
s1:{}$
flag1:1$
/*Closure Property wrt addition*/
for i:1 thru n do (
for j:1 thru n do (
s1:union(s1,set(addmod(z[i],z[j])))
))$
disp("s1=",s1)$
if setequalp(Z,s1) then
disp("Closure property is satisfied under addition")
else (
disp("Closure property is not satisfied under addition"),
flag1:0)$
11
else (
flag:0, break)
)))$
if flag=0 then (
disp("Associative Property fails under addition"),
flag1:0)
else
disp("Associative Property is satisfied under addition")$
/*Existance of Additive Identity*/
for i:1 thru n do (
for j:1 thru n do (
if addmod(z[i],z[j])=z[j] and addmod(z[j],z[i])=z[j] then
flag:1
else (
flag:0, break)
),
if flag=1 then (
e:z[i]), flag1:1)$
print("Identity is ",e)$
/*Existance of Additive Inverse*/
s2:{}$
for i:1 thru n do (
for j:1 thru n do (
if addmod(z[i],z[j])=e and addmod(z[j],z[i])=e then (
s2:union(s2,set(z[i])),
print("Additive Inverse of ",z[i],"is",z[j]))
))$
if setequalp(Z,s2) then
disp("Inverse existence property is satisfied")
else (
disp("Inverse existence property is not satisfied"),
flag1:0)$
/*Abelian Property wrt addition*/
for i:1 thru n do (
for j:1 thru n do (
if addmod(z[i],z[j])=addmod(z[i],z[j]) then
flag:1
else (
flag:0, break)
))$
if flag=0 then (
disp("Abelian Property fails under addition"),
flag1:0)
else
12
disp("Abelian Property is satisfied under addition")$
/*Closure property wrt multiplication*/
for i:1 thru n do (
for j:1 thru n do (
s1:union(s1,set(multmod(z[i],z[j])))
))$
disp("s1=",s1)$
if setequalp(Z,s1) then
disp("Closure property is satisfied under multiplication")
else (
disp("Closure property is not satisfied under
multiplication"),
flag1:0)$
/*Associative property wrt multiplication*/
for i:1 thru n do (
for j:1 thru n do (
for k:1 thru n do (
if
multmod(multmod(z[i],z[j]),z[k])=multmod(z[i],multmod(z[j],z[
k])) then
flag:1
else (
flag:0, break)
)))$
if flag=0 then (
disp("Associative Property fails under multiplication"),
flag1:0)
else
disp("Associative Property is satisfied under
multiplication")$
/*Distributive property*/
for i:1 thru n do (
for j:1 thru n do (
for k:1 thru n do (
if
multmod(addmod(z[i],z[j]),z[k])=addmod(multmod(z[i],z[k]),mul
tmod(z[j],z[k])) then
flag:1
else (
flag:0, break)
)))$
if flag=0 then (
disp("Distributive Property fails"),
13
flag1:0)
else
disp("Distributive Property is satisfied")$
if flag1=1 then
disp("Given set with operations is a ring")
else
disp("Given set with operations is not a ring")$
OUTPUT
Exercise
Prove that the following algebraic structures are rings
1. ( Z 5 , 5 , 5 ) 2. ( Z 7 , 7 , 7 )
14
7. Examples on different types of rings
Commutative Ring:
The ring ( R, , ) is called a commutative ring if a b b a a, b R .
kill(all)$
load(functs)$
makearray(z,6)$
z:[0,1,2,3,4,5]$
Z:setify(z);
multmod(x,y):=mod(x*y,6)$
n:length(z)$
/*Abelian Property wrt multiplication*/
for i:1 thru n do (
for j:1 thru n do (
if multmod(z[i],z[j])=multmod(z[i],z[j])
then
flag:1
else (
flag:0, break)
))$
if flag=0 then (
disp("Abelian Property fails under
multiplicaition"))
else
disp("Abelian Property is satisfied under
multiplication","Hence Z6 is a commutative
ring")$
OUTPUT
Exercise
Prove that the following rings are commutative
1. ( Z 5 , 5 , 5 ) 2. ( Z 7 , 7 , 7 )
15
Ring with Unity:
The ring ( R, , ) is called a ring with unity if there exists an element 1 R such that
a 1 1 a a a R .
OUTPUT
Exercise
16
Ring with Zero Divisors:
Let ( R, , ) be any ring. Let a, b R . 'a' and 'b' are called zero divisors of R if a 0
and b 0 but a b= 0.
clc;
Z=[0 1 2 3 4 5 ]
n=length(Z);
e=1;
for i=2:n
for j=2:n
if modulo(Z(i)*Z(j),6)==0 then
printf("\n Z6 has zero divisors");
printf("\n% d and %d are zero divisors in
Z6",Z(i),Z(j))
abort;
end
end
end
OUTPUT
Exercise
Check whether the following rings are ring with zero divisors or not
1. ( Z 4 , 4 , 4 ) 2. ( Z 7 , 7 , 7 )
17
8. Examples on integral domains
A commutative ring with unity element and without zero divisors is called an Integral
domain.
Scilab program to check ( Z 7 , 7 , 7 ) is a integral domain.
clear;
Z=[0 1 2 3 4 5 6];
n=length(z);
for i=1:n
for j=1:n k1=modulo(Z(i)*Z(j),7);
k2=modulo(Z(j)*Z(i),7);
if k1<>k2 then
printf("\n commutative law fails under
multiplication");
printf("Z7 is not a commutative ring");
abort;
end
end
end
printf("\n Z7 is a commutative ring")
e=1;
for i=1:n
if modulo(Z(i)*e,7)<>Z(i) | modulo(e*Z(i),7)<>Z(i)
then printf("\n Identity law doesnot hold good");
printf("\n Z7 is not a ring with unity");
abort;
end
end
printf("\n Z7 is a ring with unity")
for i=2:n
for j=2:n
if modulo(Z(i)*Z(j),7)==0 then
printf("\n Z7 has a zero divisors");
printf("\n %d and %d are zero divisors in
Z7",Z(i),Z(j))
abort;
18
end
end
end
printf("\n Z7 is a ring with no zero divisor")
printf("\n Z7 is an integral domain")
OUTPUT
Z7 is a commutative ring
Z7 is a ring with unity
Z7 is a ring with no zero divisor
Z7 is an integral domain
Exercise
Check whether the following rings are integral domains
1. ( Z 5 , 5 , 5 ) 2. ( Z 6 , 6 , 6 )
9. Examples on Fields
A commutative ring with unity in which every non zero element has a multiplicative
inverse is called a field.
kill(all)$
load(functs)$
makearray(Z,5)$
Z:[0,1,2,3,4,5,6]$
Z1:setdifference(setify(Z),{0});
addmod(x,y):=mod(x+y,7)$
multmod(x,y):=mod(x*y,7)$
n:length(Z)$
flag1:1$
19
/*Multiplicative identity*/
flag:1$
for i:2 thru n do (
if multmod(Z[2],Z[i])=Z[i] and multmod(Z[i],Z[2])=Z[i]
then flag:1
else ( flag:0, break) )$
if flag=0 then (
disp("Multiplicative Identity does not exist"), flag1:0)
else
print("Multiplicative Identity is",1,". Hence given ring
is with unity")$
OUTPUT
Exercise
Check whether the following rings are fields
1. ( Z 5 , 5 , 5 ) 2. ( Z 6 , 6 , 6 )
20
10. Examples on subrings, ideals and subring which is not an ideal
Subring
Let ( R, , ) be any ring. Let 'S' be a non empty subset of R . If 'S' is also a ring with
respect to same binary operation defined in R then S is called a subring of R.
OUTPUT
Exercise
1. Show that (3Z , , ) is a subring of (Z , , )
Ideal
Let R be a ring, I be a nonempty subset of R then I is said to be ideal of R if
i). a, b I , a b I .
ii). a I , r R, r a I , a r I . .
Maxima program to check (3Z, +, x) is an ideal
kill(all)$
A:makelist(3*k,k,-5000,5000)$
B:setify(A)$
C:listify(B)$
d:1$
if elementp(C[5]-C[8],B) and elementp(d*C[3],B) and
elementp(C[3]*d,B) then
disp("3Z is an ideal of Z")
else
disp("3Z is an not an ideal of Z )$
OUTPUT
Exercise
Show that (2Z , , ) is an ideal of (Z , , )
21
Maxima program to illustrate a subring may not be an ideal
kill(all)$
A:makelist(2*k,k,-5000,5000)$
B:setify(A)$
C:listify(B)$
d:2$
if elementp(C[5]-C[8],B) and elementp(d*C[5000],B)
then
disp("2Z is a subring of Q")
else
disp("2Z is not a subring of Q")$
forget(d)$
d:2/5$
if elementp(C[5]-C[8],B) and elementp(d*C[5000],B)
and elementp(C[5000]*d,B) then
disp("2Z is an ideal of Q")
else
disp("2Z is not an ideal of Q")$
OUTPUT
22