Bevezet\303\251s a matematik\303\241baJ\303\241rai AntalEzek a programok csak szeml\303\251ltet\303\251sre szolg\303\241lnak.1. HalmazokLUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn2. Term\303\251szetes sz\303\241mok3. A sz\303\241mfogalom b\305\221v\303\255t\303\251serestart;3.1. Eg\303\251sz sz\303\241mok3.1.1. Oszt\303\241lyoz\303\241s kompatibilit\303\241sa m\305\261velettel.`type/ordpair`:=proc(x) type(x,list) and nops(x)=2 end;iscompbinop:=proc(X::set,E::set(ordpair),f::procedure) local x,xx,y,yy;
for x in X do for y in X do
if not f(x,y) in X then return false fi;
for xx in X do for yy in X do
if [x,xx] in E and [y,yy] in E and not [f(x,y),f(xx,yy)] in E
then return false fi;
od; od; od; od; true; end;
X:={0,1,2,3,4,5}; E:={[0,0],[0,3],[3,0],[3,3],[1,1],[1,4],[4,1],[4,4],[2,2],[2,5],[5,2],[5,5]}; f:=(x,y)->irem(x+y,6); iscompbinop(X,E,f);
LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.1.2. P\303\251lda.3.1.3. Feladat.3.1.4. Oszt\303\241lyoz\303\241s kompatibilit\303\241sa rel\303\241ci\303\263val.iscomprel:=proc(X::set,E::set(ordpair),R::set(ordpair)) local x,xx,y,yy;
for x in X do for y in X do
for xx in X do for yy in X do
if [x,xx] in E and [y,yy] in E and [x,y] in R and not [xx,yy] in R
then return false fi;
od; od; od; od; true; end;
X:={0,1,2,3}; E:={[0,0],[0,2],[2,0],[2,2],[1,1],[1,3],[3,1],[3,3]};
R:={[0,1],[0,3],[2,1],[2,3]}; iscomprel(X,E,R);LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.1.5. P\303\251lda.3.1.6. T\303\251tel.type(5,integer); type(-3,integer); type(0,integer);`&~`:=(x,y)->x[1]+y[2]=x[2]+y[1];
`&+`:=(x,y)->[x[1]+y[1],x[2]+y[2]];
`&*`:=(x,y)->[x[1]*y[1]+x[2]*y[2],x[1]*y[2]+y[1]*x[2]];
`&le`:=(x,y)->x[1]+y[2]<=x[2]+y[1];
[7,4]&~[3,0]; [7,4]&+[2,6]; [2,1]&*[2,4]; [3,5]&le[2,3];
LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.1.7. T\303\251tel: \342\204\225 be\303\241gyaz\303\241sa \342\204\244-be.3.1.8. Az eg\303\251sz sz\303\241mok rendez\303\251se.3.1.9. Az eg\303\251sz sz\303\241mok szorz\303\241sa.3.1.10. Az eg\303\251sz sz\303\241mok sz\303\241m\303\255t\303\263g\303\251pes \303\241br\303\241zol\303\241sa.3.1.11. Hatv\303\241nyoz\303\241s eg\303\251sz kitev\305\221vel.(a^(-1))^5; a^(m+n); expand(%); (a*b)^5;
(a^n)^m; combine(%,power) assuming integer;LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.1.12. P\303\251lda.3.1.13. Gy\305\261r\305\261k.isgrupoid:=proc(G::set,f::procedure) local x,y;
for x in G do for y in G do if not f(x,y) in G then return false fi;
od; od; true; end;
neutral:=proc(G::set,f::procedure) local x,y,s,S;
if not isgrupoid(G,f) then return NULL fi;
for x in G do s:=true; for y in G do
if f(x,y)<>y or f(y,x)<>y then s:=false; break; fi;
od; if s then return x fi; od; NULL end;
G:={a,b,c};neutral(G,(x,y)->y);neutral(G,(x,y)->y);
neutral({0,1,2},(x,y)->irem(x+y,3));
issemigroup:=proc(G::set,f::procedure) local x,y,z;
if not isgrupoid(G,f) then return false fi;
for x in G do for y in G do for z in G do
if f(x,f(y,z))<>f(f(x,y),z) then return false fi;
od; od; od; true end;
issemigroup({a,b,c},(x,y)->x);
issemigroup({true,false},(x,y)-> x implies y);
isgroup:=proc(G::set,f::procedure) local x,y,n,i;
if not isgrupoid(G,f) then return false fi;
if not issemigroup(G,f) then return false fi;
n:=neutral(G,f); if n=NULL then return false fi;
for x in G do i:=false; for y in G do
if f(x,y)=n and f(y,x)=n then i:=true; break fi;
od; if i=false then return false fi; od; true; end;
isgroup({0,1,2},(x,y)->irem(x+y,3));
iscommutative:=proc(G::set,f::procedure) local x,y;
if not isgrupoid(G,f) then return false fi;
for x in G do for y in G do
if f(x,y)<>f(y,x) then return false fi;
od; od; true; end;
iscommutative({0,1,2},(x,y)->irem(x+y,3));
isabeliangroup:=proc(G::set,f::procedure)
isgroup(G,f) and iscommutative(G,f) end;
iscommutative({0,1,2},(x,y)->irem(x+y,3));
isleftdistributive:=proc(R::set,f::procedure,g::procedure) local x,y,z;
if not isgrupoid(R,f) then return false fi;
if not isgrupoid(R,g) then return false fi;
for x in R do for y in R do for z in R do
if g(x,f(y,z))<>f(g(x,y),g(x,z)) then return false fi;
od; od; od; true end;isrightdistributive:=proc(R::set,f::procedure,g::procedure) local x,y,z;
if not isgrupoid(R,f) then return false fi;
if not isgrupoid(R,g) then return false fi;
for x in R do for y in R do for z in R do
if g(f(y,z),x)<>f(g(y,x),g(z,x)) then return false fi;
od; od; od; true end;isring:=proc(R::set,f::procedure,g::procedure)
isabeliangroup(R,f) and issemigroup(R,g)
and isleftdistributive(R,f,g) and isrightdistributive(R,f,g) end;iscommutativering:=proc(R::set,f::procedure,g::procedure)
isring(R,f,g) and iscommutative(R,g) end;isringwithunity:=proc(R::set,f::procedure,g::procedure)
isring(R,f,g) and neutral(R,g)<>NULL end;isringwithunity({0},(x,y)->0,(x,y)->0);X:={a,b,c}; P:=combinat[powerset](X);
isring(P,(x,y)->symmdiff(x,y),(x,y)->{});LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.1.14. P\303\251lda.iscommutativering(P,(x,y)->symmdiff(x,y),(x,y)->x intersect y);
isringwithunity(P,(x,y)->symmdiff(x,y),(x,y)->x intersect y);
LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn->3.1.15. Feladat.3.1.16. P\303\251ld\303\241k.LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn->3.1.17. Feladat.->3.1.18. Feladat.->3.1.19. Feladat.3.1.20. Az \303\241ltal\303\241nos disztributivit\303\241s t\303\251tele.A:=sum(a[i],i=1..4); B:=sum(b[j],j=1..5); A*B; expand(%);LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.1.21. Nulloszt\303\263k, integrit\303\241si tartom\303\241ny, rendezett integrit\303\241si tartom\303\241ny.LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.1.22. T\303\251tel.LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.1.23. T\303\251tel.LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn->3.1.24. Feladat.->3.1.25. Feladat.3.2. Racion\303\241lis sz\303\241mok3.2.1. T\303\251tel.type(5/7,rational); type(0,rational);`&~`:=(x,y)->x[1]*y[2]=y[1]*x[2];
`&+`:=(x,y)->[x[1]*y[2]+x[2]*y[1],x[2]*y[2]];
`&*`:=(x,y)->[x[1]*y[1],x[2]*y[2]];
`&le`:=(x,y)->(y[1]*x[2]-y[2]*x[1])*x[2]*y[2]>=0;
[1,5]&~[2,10]; [1,2]&+[2,3]; [1,2]&*[2,3]; [1,2]&le[2,3];
LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.2.2. T\303\251tel: \342\204\244 be\303\241gyaz\303\241sa \342\204\232-ba.LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.2.3. Ferdetest, test, rendezett test.isskewfield:=proc(R::set,f::procedure,g::procedure) local n;
n:=neutral(R,f); if n=NULL then return false fi;
isring(R,f,g) and isgroup(R minus {n},g) end;isfield:=proc(R::set,f::procedure,g::procedure) local n;
n:=neutral(R,f); if n=NULL then return false fi;
isring(R,f,g) and isabeliangroup(R minus {n},g) end;&+(0,0):=0; &+(0,1):=1; &+(1,0):=1; &+(1,1):=0;
&*(0,0):=0; &*(0,1):=0; &*(1,0):=0; &*(1,1):=1;
isfield({0,1},(x,y)->x&+y,(x,y)->x&*y);LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.2.4. P\303\251ld\303\241k.`&+`:=(x,y)->irem(x+y,5); `&*`:=(x,y)->irem(x*y,5); 3&+4; 3&*4;LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.2.5 T\303\251tel: \342\204\232 be\303\241gyaz\303\241sa rendezett testbe.LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn->3.2.6. Feladat.->3.2.7. Feladat.->3.2.8. Feladat.3.2.9. Feladat.LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.3. Val\303\263s sz\303\241mokrestart;3.3.1. \303\201ll\303\255t\303\241s.i:='i': x:=0:
for i from 0 do while (x+1)^2<2*10^(2*i) do x:=x+1: od; x; x:=x*10: od;LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.3.2. Arkhim\303\251d\303\251szi tulajdons\303\241g.LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.3.3. \303\201ll\303\255t\303\241s.LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.3.4. \303\201ll\303\255t\303\241s.*3.3.5. T\303\251tel.LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.3.6. T\303\251tel.LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.3.7. Val\303\263s sz\303\241mok.abs(7.4); abs(-3); abs(0); signum(7.4); signum(-3); signum(0);floor(3.14); ceil(3.14); ceil(-3.14);Rmod:=proc(x::realcons,y::realcons) if y=0 then x else x-floor(x/y)*y fi; end;
Rmod(5,0); Rmod(3.1415,2.78);
LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.3.8. B\305\221v\303\255tett val\303\263s sz\303\241mok.3.3.9. Val\303\263s sz\303\241mok kerek\303\255t\303\251se \303\251s fixpontos \303\241br\303\241zol\303\241sa sz\303\241m\303\255t\303\263g\303\251pben.3.3.10. Val\303\263s sz\303\241mok lebeg\305\221pontos \303\241br\303\241zol\303\241sa sz\303\241m\303\255t\303\263g\303\251pben.3.3.11. T\303\251tel: a val\303\263s sz\303\241mok l\303\251tez\303\251se.*3.3.12. A val\303\263s sz\303\241mok m\303\241s bevezet\303\251sei.LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.3.13. T\303\251tel: gy\303\266kvon\303\241s.3.3.14. K\303\266vetkem\303\251ny. 3.3.15. A term\303\251szetes, az eg\303\251sz \303\251s a racion\303\241lis sz\303\241mok bevezet\303\251se a val\303\263s sz\303\241mok seg\303\255ts\303\251g\303\251vel. ->3.2.16. Feladat.->3.2.17. Feladat.3.2.18. Feladat.3.2.19. Feladat.3.2.20. Feladat.LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.2.21. Feladat.->3.2.22. Feladat.3.2.23. Feladat.3.2.24. Feladat.3.2.25. Feladat.->3.2.26. Feladat.->3.2.27. Feladat.->3.2.28. Feladat.->3.2.29. Feladat.LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn->3.2.30. Feladat.3.2.31. Feladat.3.2.32. Feladat.3.2.33. Feladat.3.2.34. Feladat: \303\266r\303\266knapt\303\241r.3.2.35. Feladat.->3.2.36. Feladat.->3.2.37. Feladat.3.2.38. Feladat.3.2.39. Feladat.3.2.40. Feladat.3.2.41. Feladat.3.2.42. Feladat.3.2.43. Feladat.3.2.44. Feladat.3.2.45. Feladat.3.2.46. Feladat.3.2.47. Feladat.*3.2.48. Feladat.3.2.49. Feladat.*3.2.50. Feladat.3.3.51. Tov\303\241bbi feladatok.3.4. Komplex sz\303\241mokrestart;3.4.1. Komplex sz\303\241mok.`&+`:=proc(z,w) [z[1]+w[1],z[2]+w[2]] end;
`&*`:=proc(z,w) [z[1]*w[1]-z[2]*w[2],z[1]*w[2]+z[2]*w[1]] end;
[x,y]&+[0,0]; [x,y]&+[-x,-y]; [x,y]&*[1,0];
[x,y]&*[x/(x^2+y^2),-y/(x^2+y^2)]; simplify(%);
[0,1]&*[0,1];
Complex(3,5); z:=3+5*I; w:=-2-6*I; z*w; Re(z); Im(z); conjugate(z);
z:='z';w:='w'; conjugate(z);
conjugate(conjugate(z));conjugate(z+w);expand(%);conjugate(1/z);
LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.4.2. P\303\251lda.64/(3^(1/2)+I); evalc(%);LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.4.3. Komplex sz\303\241m abszol\303\272t \303\251rt\303\251ke.z:=x+I*y;abs(z);evalc(%);evalc(1/(x+I*y));evalc(conjugate(z)/abs(z)^2);signum(3+4*I); signum(-5); signum(0);LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn->3.4.4. Feladat.->3.4.5. Feladat.->3.4.6. Feladat.evalc(2/(1-I)/(3+I)); evalc(1/(3+4*I)^2); evalc((2+I)/I/(-3+4*I));
evalc((3^(1/2)+I)/(1-I)/(3^(1/2)-I)); simplify(%);
evalc(1/I/(3-2*I)/(1+I)); evalc(1/(1-I)/(1-2*I)/(1+2*I));->3.4.7. Feladat.3.4.8. Feladat.3.4.9. Feladat.3.4.10. Komplex sz\303\241m argumentuma \303\251s trigonometrikus alakja.polar(x+I*y); op(1,%); op(2,%%); polar(3+4*I); evalc(%); argument(3+I*4);LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.4.11. P\303\251lda.z:=16*sqrt(3)-I*16; polar(z);LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.4.12. Gy\303\266kvon\303\241s komplex sz\303\241mb\303\263l.LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.4.13. P\303\251lda.z:='z'; i:='i'; w:=16*sqrt(3)-I*16; solve(z^5=w,z); z1:=w^(1/5);
r:=abs(w); phi:=argument(w);
r^(1/5)*(cos(phi/5+i*2*Pi/5)+I*sin(phi/5+i*2*Pi/5))$i=0..4; evalf(%);
solve(z^5=1); map(z->evalf(z*z1),[%]);
LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.4.14. Az algebra alapt\303\251tele.f:=(x-1)^2*(x-2); f:=expand(f); solve(f,x); solve(x^3=1,x); r:=[%];
LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn->3.4.15. Feladat.->3.4.16. Feladat.->3.4.17. Feladat.3.4.18. Feladat.3.4.19. Feladat.3.4.20. Feladat.3.4.21. Feladat.->3.4.22. Feladat.->3.4.23. Feladat.->3.4.24. Feladat.->3.4.25. Feladat.3.4.26. Feladat.3.4.27. Feladat.3.4.28. Kvaterni\303\263k.`&+`:=(p,q)->[p[1]+q[1],p[2]+q[2]];
`&*`:=(p,q)->[p[1]*q[1]-conjugate(q[2])*p[2],q[2]*p[1]+p[2]*conjugate(q[1])];p:=[a+I*b,c+I*d]; p&+[0,0]; p&+[-a-I*b,-c-I*d];
p&*[1,0]; [1,0]&*p;
q:=[(a-I*b)/(a^2+b^2+c^2+d^2),(-c-I*d)/(a^2+b^2+c^2+d^2)];
p&*q;evalc(%);simplify(%); q&*p;evalc(%);simplify(%);
z:='z';w:='w';z1:='z1';p:=[z,w];p1:=[z1,w1];p2:=[z2,w2];
p&*(p1&*p2);expand(%);(p&*p1)&*p2;expand(%);
p&*(p1&+p2);expand(%);(p&*p1)&+(p&*p2);
(p1&+p2)&*p;expand(%);(p1&*p)&+(p2&*p);
j:=[0,1]; j&*j; [z,0]&+([w,0]&*j);k:=[0,I]; k&*k; i:=[I,0]; i&*i; [a,0]&+([b,0]&*i)&+([c,0]&*j)&+([d,0]&*k);
p:=[a+I*b,c+I*d]; evalc([x,0]&*p); evalc(p&*[x,0]);
j&*[z,0]; [z,0]&*j;i&*j; j&*k; k&*i; j&*i; k&*j; i&*k;
i:='i'; j:='j'; k:='k';
C2toR4:=q->evalc(Re(q[1])+Im(q[1])*i+Re(q[2])*j+Im(q[2])*k); q:=C2toR4(p);
R4toC2:=q->[q-coeff(q,i)*i-coeff(q,j)*j-coeff(q,k)*k+I*coeff(q,i),coeff(q,j)+I*coeff(q,k)]; R4toC2(q);
qIm:=q->coeff(q,i)*i+coeff(q,j)*j+coeff(q,k)*k;qRe:=q->q-qIm(q); qRe(q); qIm(q);
qconjugate:=q->qRe(q)-qIm(q); qconjugate(q);
q; qconjugate(q); qconjugate(%); q+qconjugate(q); q-qconjugate(q);q1:=a1+b1*i+c1*j+d1*k; q2:=a2+b2*i+c2*j+d2*k;
q1+q2; collect(%,[i,j,k]); `&+`:=(q1,q2)->collect(q1+q2,[i,j,k]); q1&+q2;
`&*`:=proc(q1,q2) local a1,a2,b1,b2,c1,c2,d1,d2;
a1:=qRe(q1);a2:=qRe(q2);b1:=coeff(q1,i);b2:=coeff(q2,i);
c1:=coeff(q1,j);c2:=coeff(q2,j);d1:=coeff(q1,k);d2:=coeff(q2,k);
(a1*a2-b1*b2-c1*c2-d1*d2)+(a1*b2+a2*b1+c1*d2-d1*c2)*i+
(a1*c2+c1*a2+d1*b2-b1*d2)*j+(a1*d2+d1*a2+b1*c2-c1*b2)*k;end;
q1&*q2;
qconjugate(q1&+q2); qconjugate(q1)&+qconjugate(q2);
qconjugate(q1&*q2);qconjugate(q2)&*qconjugate(q1); expand(%%-%);
LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn3.4.29. Kvaterni\303\263k abszol\303\272t \303\251rt\303\251ke.qabs:=q->sqrt(qRe(q)^2+coeff(q,i)^2+coeff(q,j)^2+coeff(q,k)^2);
qabs(q); q&*qconjugate(q);
LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn->3.4.30. Feladat.*3.4.31. Vektori\303\241lis szorz\303\241s.*3.4.32. Kvaterni\303\263k \303\251s a h\303\241romdimenzi\303\263s euklid\303\251szi t\303\251r.q1:=b1*i+c1*j+d1*k; q2:=b2*i+c2*j+d2*k; q3:=b3*i+c3*j+d3*k;
scalarprod:=(q1,q2)->-qRe(q1&*q2); scalarprod(q1,q2);
vectorprod:=(q1,q2)->qIm(q1&*q2); vectorprod(q1,q2);
mixedprod:=(q1,q2,q3)->scalarprod(q1,vectorprod(q2,q3));
mixedprod(q1,q2,q3);
LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn*3.4.33. A szorz\303\241sok geometriai jelent\303\251se.*3.4.34. Forgat\303\241sok.*3.4.35. A skal\303\241ris es vektori\303\241lis szorz\303\241s geometriai alkalmaz\303\241sai.* 3.4.36. Okt\303\241vok vagy Cayley-sz\303\241mok.->3.4.37. Feladat.->3.4.38. Feladat.*3.4.39. Feladat.3.4.40. Tov\303\241bbi feladatok megold\303\241sokkal.3.4.41. Tov\303\241bbi feladatok.LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0YnLUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn4. V\303\251ges halmazokLUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn5. V\303\251gtelen halmazokLUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn6. Sz\303\241melm\303\251letLUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn7. Gr\303\241felm\303\251letLUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn8. AlgebraLUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn9. K\303\263dol\303\241sLUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn10. AlgoritmusokLUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0YnLUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn