1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203 |
- <a name=r38_0600>
- <title>matrix_augment</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>MATRIX_AUGMENT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- Matrix augment, matrix stack:
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>matrix_augment</em>{<matrix\_list>}
- <P>
- <P>
- <P>
- (If you are feeling lazy then the braces can be omitted.)
- <P>
- <P>
- <matrix\_list> :- matrices.
- <P>
- <P>
- <em>matrix_augment</em>sticks the matrices in <matrix\_list>
- together horizontally.
- <P>
- <P>
- <em>matrix_stack</em>sticks the matrices in <matrix\_list>
- together vertically.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- matrix_augment({A,A});
- [1 2 3 1 2 3]
- [ ]
- [4 5 6 4 5 6]
- [ ]
- [7 8 9 7 8 9]
- matrix_stack(A,A);
- [1 2 3]
- [ ]
- [4 5 6]
- [ ]
- [7 8 9]
- [ ]
- [1 2 3]
- [ ]
- [4 5 6]
- [ ]
- [7 8 9]
- </tt></pre><p>Related functions:
- <a href=r38_0550.html#r38_0577>augment_columns</a>,
- <a href=r38_0600.html#r38_0615>stack_rows</a>,
- <a href=r38_0600.html#r38_0616>sub_matrix</a>.
- <P>
- <P>
- <a name=r38_0601>
- <title>matrixp</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>MATRIXP</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>matrixp</em>(<test\_input>)
- <P>
- <P>
- <P>
- <test\_input> :- anything you like.
- <P>
- <P>
- <em>matrixp</em>is a boolean function that returns t if the input is a
- matrix and nil otherwise.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- matrixp A;
- t
- matrixp(doodlesackbanana);
- nil
- </tt></pre><p>Related functions:
- <a href=r38_0600.html#r38_0614>squarep</a>,
- <a href=r38_0600.html#r38_0621>symmetricp</a>.
- <P>
- <P>
- <a name=r38_0602>
- <title>matrix_stack</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>MATRIX_STACK</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- see:
- <a href=r38_0600.html#r38_0600>matrix_augment</a>.
- <P>
- <P>
- <a name=r38_0603>
- <title>minor</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>MINOR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>minor</em>(<matrix>,<r>,<c>)
- <P>
- <P>
- <P>
- <matrix> :- a
- <a href=r38_0300.html#r38_0345>matrix</a>.
- <r>,<c> :- positive integers.
- <P>
- <P>
- <em>minor</em>computes the (<r>,<c>)'th minor of <matrix>.
- This is created by removing the <r>'th row and the <c>'th
- column from <matrix>.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- minor(A,1,3);
- [4 5]
- [ ]
- [7 8]
- </tt></pre><p>Related functions:
- <a href=r38_0600.html#r38_0609>remove_columns</a>,
- <a href=r38_0600.html#r38_0610>remove_rows</a>.
- <P>
- <P>
- <a name=r38_0604>
- <title>mult_columns</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>MULT_COLUMNS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- Mult columns, mult rows:
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>mult_columns</em>(<matrix>,<column\_list>,<expr>)
- <P>
- <P>
- <P>
- <matrix> :- a
- <a href=r38_0300.html#r38_0345>matrix</a>.
- <P>
- <P>
- <column\_list> :- a positive integer or a list of positive
- integers.
- <P>
- <P>
- <expr> :- an algebraic expression.
- <P>
- <P>
- <em>mult_columns</em>returns a copy of <matrix> in which the
- columns specified in <column\_list> have been multiplied by
- <expr>.
- <P>
- <P>
- <em>mult_rows</em>performs the same task on the rows of <matrix>.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- mult_columns(A,{1,3},x);
- [ x 2 3*x]
- [ ]
- [4*x 5 6*x]
- [ ]
- [7*x 8 9*x]
- mult_rows(A,2,10);
- [1 2 3 ]
- [ ]
- [40 50 60]
- [ ]
- [7 8 9 ]
- </tt></pre><p>Related functions:
- <a href=r38_0550.html#r38_0575>add_to_columns</a>,
- <a href=r38_0550.html#r38_0576>add_to_rows</a>.
- <P>
- <P>
- <a name=r38_0605>
- <title>mult_rows</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>MULT_ROWS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- see:
- <a href=r38_0600.html#r38_0604>mult_columns</a>.
- <P>
- <P>
- <a name=r38_0606>
- <title>pivot</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>PIVOT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>pivot</em>(<matrix>,<r>,<c>)
- <P>
- <P>
- <P>
- <matrix> :- a matrix.
- <P>
- <P>
- <r>,<c> :- positive integers such that <matrix>(<r>,
- <c>) neq 0.
- <P>
- <P>
- <em>pivot</em>pivots <matrix> about it's (<r>,<c>)'th
- entry.
- <P>
- <P>
- To do this, multiples of the <r>'th row are added to every other
- row in the matrix.
- <P>
- <P>
- This means that the <c>'th column will be 0 except for the
- (<r>,<c>)'th entry.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- pivot(A,2,3);
- [ - 1 ]
- [-1 ------ 0]
- [ 2 ]
- [ ]
- [4 5 6]
- [ ]
- [ 1 ]
- [1 --- 0]
- [ 2 ]
- </tt></pre><p>Related functions:
- <a href=r38_0600.html#r38_0612>rows_pivot</a>.
- <P>
- <P>
- <a name=r38_0607>
- <title>pseudo_inverse</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>PSEUDO_INVERSE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>pseudo_inverse</em>(<matrix>)
- <P>
- <P>
- <P>
- <matrix> :- a
- <a href=r38_0300.html#r38_0345>matrix</a>.
- <P>
- <P>
- <em>pseudo_inverse</em>, also known as the Moore-Penrose inverse,
- computes the pseudo inverse of <matrix>.
- <P>
- <P>
- Given the singular value decomposition of <matrix>, i.e:
- A = U*P*V^T, then the pseudo inverse A^-1 is defined by
- A^-1 = V^T*P^-1*U.
- <P>
- <P>
- Thus <matrix> * pseudo_inverse(A) = Id.
- (Id is the identity matrix).
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- R := mat((1,2,3,4),(9,8,7,6));
- [1 2 3 4]
- r := [ ]
- [9 8 7 6]
- on rounded;
- pseudo_inverse(R);
- [ - 0.199999999996 0.100000000013 ]
- [ ]
- [ - 0.0499999999988 0.0500000000037 ]
- [ ]
- [ 0.0999999999982 - 5.57825497203e-12]
- [ ]
- [ 0.249999999995 - 0.0500000000148 ]
- </tt></pre><p>Related functions:
- <a href=r38_0600.html#r38_0617>svd</a>.
- <P>
- <P>
- <a name=r38_0608>
- <title>random_matrix</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>RANDOM_MATRIX</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>random_matrix</em>(<r>,<c>,<limit>)
- <P>
- <P>
- <P>
- <r>,<c>,<limit> :- positive integers.
- <P>
- <P>
- <em>random_matrix</em>creates an <r> by <c> matrix with random
- entries in the range -limit <entry <limit.
- <P>
- <P>
- Switches:
- <P>
- <P>
- <em>imaginary</em>:- if on then matrix entries are x+i*y where -limit <x,y
- <<limit>.
- <P>
- <P>
- <em>not_negative</em>:- if on then 0 <entry <<limit>. In the imagina
- ry
- case we have 0 <x,y <<limit>.
- <P>
- <P>
- <em>only_integer</em>:- if on then each entry is an integer. In the imaginary
- case x and y are integers.
- <P>
- <P>
- <em>symmetric</em>:- if on then the matrix is symmetric.
- <P>
- <P>
- <em>upper_matrix</em>:- if on then the matrix is upper triangular.
- <P>
- <P>
- <em>lower_matrix</em>:- if on then the matrix is lower triangular.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- on rounded;
- random_matrix(3,3,10);
- [ - 8.11911717343 - 5.71677292768 0.620580830035 ]
- [ ]
- [ - 0.032596262422 7.1655452861 5.86742633837 ]
- [ ]
- [ - 9.37155438255 - 7.55636708637 - 8.88618627557]
- on only_integer, not_negative, upper_matrix, imaginary;
- random_matrix(4,4,10);
- [70*i + 15 28*i + 8 2*i + 79 27*i + 44]
- [ ]
- [ 0 46*i + 95 9*i + 63 95*i + 50]
- [ ]
- [ 0 0 31*i + 75 14*i + 65]
- [ ]
- [ 0 0 0 5*i + 52 ]
- </tt></pre><p>
- <a name=r38_0609>
- <title>remove_columns</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>REMOVE_COLUMNS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- Remove columns, remove rows:
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>remove_columns</em>(<matrix>,<column\_list>)
- <P>
- <P>
- <P>
- <matrix> :- a
- <a href=r38_0300.html#r38_0345>matrix</a>.
- <column\_list> :- either a positive integer or a list of positive
- integers.
- <P>
- <P>
- <em>remove_columns</em>removes the columns specified in
- <column\_list> from <matrix>.
- <P>
- <P>
- <em>remove_rows</em>performs the same task on the rows of <matrix>.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- remove_columns(A,2);
- [1 3]
- [ ]
- [4 6]
- [ ]
- [7 9]
- remove_rows(A,{1,3});
- [4 5 6]
- </tt></pre><p>Related functions:
- <a href=r38_0600.html#r38_0603>minor</a>.
- <P>
- <P>
- <a name=r38_0610>
- <title>remove_rows</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>REMOVE_ROWS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- see:
- <a href=r38_0600.html#r38_0609>remove_columns</a>.
- <P>
- <P>
- <a name=r38_0611>
- <title>row_dim</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>ROW_DIM</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- see:
- <a href=r38_0550.html#r38_0584>column_dim</a>.
- <P>
- <P>
- <a name=r38_0612>
- <title>rows_pivot</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>ROWS_PIVOT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>rows_pivot</em>(<matrix>,<r>,<c>,{<row\_list>})
- <P>
- <P>
- <P>
- <matrix> :- a namerefmatrix.
- <P>
- <P>
- <r>,<c> :- positive integers such that <matrix>(<r>,
- <c>) neq 0.
- <P>
- <P>
- <row\_list> :- positive integer or a list of positive integers.
- <P>
- <P>
- <em>rows_pivot</em>performs the same task as <em>pivot</em> but applies
- the pivot only to the rows specified in <row\_list>.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- N := mat((1,2,3),(4,5,6),(7,8,9),(1,2,3),(4,5,6));
- [1 2 3]
- [ ]
- [4 5 6]
- [ ]
- n := [7 8 9]
- [ ]
- [1 2 3]
- [ ]
- [4 5 6]
- rows_pivot(N,2,3,{4,5});
- [1 2 3]
- [ ]
- [4 5 6]
- [ ]
- [7 8 9]
- [ ]
- [ - 1 ]
- [-1 ------ 0]
- [ 2 ]
- [ ]
- [0 0 0]
- </tt></pre><p>Related functions:
- <a href=r38_0600.html#r38_0606>pivot</a>.
- <P>
- <P>
- <a name=r38_0613>
- <title>simplex</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>SIMPLEX</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>simplex</em>(<max/min>,<objective function>,
- {<linear inequalities>})
- <P>
- <P>
- <P>
- <max/min> :- either max or min (signifying maximize and
- minimize).
- <P>
- <P>
- <objective function> :- the function you are maximizing or
- minimizing.
- <P>
- <P>
- <linear inequalities> :- the constraint inequalities. Each one must
- be of the form sum of variables (
- <=,=,>=) number.
- <P>
- <P>
- <em>simplex</em>applies the revised simplex algorithm to find the
- optimal(either maximum or minimum) value of the
- <objective function> under the linear inequality constraints.
- <P>
- <P>
- It returns {optimal value,{ values of variables at this optimal}}.
- <P>
- <P>
- The algorithm implies that all the variables are non-negative.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- simplex(max,x+y,{x>=10,y>=20,x+y<=25});
- ***** Error in simplex: Problem has no feasible solution
- simplex(max,10x+5y+5.5z,{5x+3z<=200,x+0.1y+0.5z<=12,
- 0.1x+0.2y+0.3z<=9, 30x+10y+50z<=1500});
- {525.0,{x=40.0,y=25.0,z=0}}
- </tt></pre><p>
- <a name=r38_0614>
- <title>squarep</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>SQUAREP</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>squarep</em>(<matrix>)
- <P>
- <P>
- <P>
- <matrix> :- a
- <a href=r38_0300.html#r38_0345>matrix</a>.
- <P>
- <P>
- <em>squarep</em>is a predicate that returns t if the <matrix> is
- square and nil otherwise.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- squarep(mat((1,3,5)));
- nil
- squarep(A);
- t
- </tt></pre><p>Related functions:
- <a href=r38_0600.html#r38_0601>matrixp</a>,
- <a href=r38_0600.html#r38_0621>symmetricp</a>.
- <P>
- <P>
- <a name=r38_0615>
- <title>stack_rows</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>STACK_ROWS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- see:
- <a href=r38_0550.html#r38_0577>augment_columns</a>.
- <P>
- <P>
- <a name=r38_0616>
- <title>sub_matrix</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>SUB_MATRIX</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>sub_matrix</em>(<matrix>,<row\_list>,<column\_list>)
- <P>
- <P>
- <P>
- <matrix> :- a matrix.
- <row\_list>, <column\_list> :- either a positive integer or a
- list of positive integers.
- <P>
- <P>
- namesub_matrix produces the matrix consisting of the intersection of
- the rows specified in <row\_list> and the columns specified in
- <column\_list>.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- sub_matrix(A,{1,3},{2,3});
- [2 3]
- [ ]
- [8 9]
- </tt></pre><p>Related functions:
- <a href=r38_0550.html#r38_0577>augment_columns</a>,
- <a href=r38_0600.html#r38_0615>stack_rows</a>.
- <P>
- <P>
- <a name=r38_0617>
- <title>svd</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>SVD</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- Singular value decomposition:
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>svd</em>(<matrix>)
- <P>
- <P>
- <P>
- <matrix> :- a
- <a href=r38_0300.html#r38_0345>matrix</a> containing only numeric entries.
- <P>
- <P>
- <em>svd</em>computes the singular value decomposition of <matrix>.
- <P>
- <P>
- It returns
- <P>
- <P>
- {U,P,V}
- <P>
- <P>
- where A = U*P*V^T
- <P>
- <P>
- and P = diag(sigma(1) ... sigma(n)).
- <P>
- <P>
- sigma(i) for i= 1 ... n are the singular values of
- <matrix>.
- <P>
- <P>
- n is the column dimension of <matrix>.
- <P>
- <P>
- The singular values of <matrix> are the non-negative square roots
- of the eigenvalues of A^T*A.
- <P>
- <P>
- U and V are such that U*U^T = V*V^T = V^T*V = Id.
- Id is the identity matrix.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- Q := mat((1,3),(-4,3));
- [1 3]
- q := [ ]
- [-4 3]
- on rounded;
- svd(Q);
- {
- [ 0.289784137735 0.957092029805]
- [ ]
- [ - 0.957092029805 0.289784137735]
- ,
- [5.1491628629 0 ]
- [ ]
- [ 0 2.9130948854]
- ,
- [ - 0.687215403194 0.726453707825 ]
- [ ]
- [ - 0.726453707825 - 0.687215403194]
- }
- </tt></pre><p>
- <a name=r38_0618>
- <title>swap_columns</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>SWAP_COLUMNS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- Swap columns, swap rows:
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>swap_columns</em>(<matrix>,<c1>,<c2>)
- <P>
- <P>
- <P>
- <matrix> :- a
- <a href=r38_0300.html#r38_0345>matrix</a>.
- <P>
- <P>
- <c1>,<c1> :- positive integers.
- <P>
- <P>
- <em>swap_columns</em>swaps column <c1> of <matrix> with
- column <c2>.
- <P>
- <P>
- <em>swap_rows</em>performs the same task on two rows of <matrix>.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- swap_columns(A,2,3);
- [1 3 2]
- [ ]
- [4 6 5]
- [ ]
- [7 9 8]
- swap_rows(A,1,3);
- [7 8 9]
- [ ]
- [4 5 6]
- [ ]
- [1 2 3]
- </tt></pre><p>Related functions:
- <a href=r38_0600.html#r38_0619>swap_entries</a>.
- <P>
- <P>
- <a name=r38_0619>
- <title>swap_entries</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>SWAP_ENTRIES</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>swap_entries</em>(<matrix>,{<r1>,<c1>},{<r2>,
- <c2>})
- <P>
- <P>
- <P>
- <matrix> :- a
- <a href=r38_0300.html#r38_0345>matrix</a>.
- <P>
- <P>
- <r1>,<c1>,<r2>,<c2> :- positive integers.
- <P>
- <P>
- <em>swap_entries</em>swaps <matrix>(<r1>,<c1>) with
- <matrix>(<r2>,<c2>).
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- swap_entries(A,{1,1},{3,3});
- [9 2 3]
- [ ]
- [4 5 6]
- [ ]
- [7 8 1]
- </tt></pre><p>Related functions:
- <a href=r38_0600.html#r38_0618>swap_columns</a>,
- <a href=r38_0600.html#r38_0620>swap_rows</a>.
- <P>
- <P>
- <a name=r38_0620>
- <title>swap_rows</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>SWAP_ROWS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- see:
- <a href=r38_0600.html#r38_0618>swap_columns</a>.
- <P>
- <P>
- <a name=r38_0621>
- <title>symmetricp</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>SYMMETRICP</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>symmetricp</em>(<matrix>)
- <P>
- <P>
- <P>
- <matrix> :- a
- <a href=r38_0300.html#r38_0345>matrix</a>.
- <P>
- <P>
- <em>symmetricp</em>is a predicate that returns t if the matrix is symmetric
- and nil otherwise.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- symmetricp(make_identity(11));
- t
- symmetricp(A);
- nil
- </tt></pre><p>Related functions:
- <a href=r38_0600.html#r38_0601>matrixp</a>,
- <a href=r38_0600.html#r38_0614>squarep</a>.
- <P>
- <P>
- <a name=r38_0622>
- <title>toeplitz</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>TOEPLITZ</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>toeplitz</em>(<expr\_list>)
- <P>
- <P>
- <P>
- (If you are feeling lazy then the braces can be omitted.)
- <P>
- <P>
- <expr\_list> :- list of algebraic expressions.
- <P>
- <P>
- <em>toeplitz</em>creates the toeplitz matrix from the <expr\_list>.
- <P>
- <P>
- This is a square symmetric matrix in which the first expression is
- placed on the diagonal and the i'th expression is placed on the (i-1)'th
- sub and super diagonals.
- <P>
- <P>
- It has dimension n where n is the number of expressions.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- toeplitz({w,x,y,z});
- [w x y z]
- [ ]
- [x w x y]
- [ ]
- [y x w x]
- [ ]
- [z y x w]
- </tt></pre><p>
- <a name=r38_0623>
- <title>vandermonde</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>VANDERMONDE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>vandermonde</em>({<expr\_list>})
- <P>
- <P>
- <P>
- (If you are feeling lazy then the braces can be omitted.)
- <P>
- <P>
- <expr\_list> :- list of algebraic expressions.
- <P>
- <P>
- <em>vandermonde</em>creates the vandermonde matrix from the
- <expr\_list>.
- <P>
- <P>
- This is the square matrix in which the (i,j)'th entry is
- <expr\_list>(i)^(j-1).
- <P>
- <P>
- It has dimension n where n is the number of expressions.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- vandermonde({x,2*y,3*z});
- [ 2 ]
- [1 x x ]
- [ ]
- [ 2]
- [1 2*y 4*y ]
- [ ]
- [ 2]
- [1 3*z 9*z ]
- </tt></pre><p>
- <a name=r38_0624>
- <title>Linear Algebra package</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>Linear Algebra package</b><menu>
- <li><a href=r38_0550.html#r38_0571>Linear Algebra package introduction</a><P>
- <li><a href=r38_0550.html#r38_0572>fast_la switch</a><P>
- <li><a href=r38_0550.html#r38_0573>add_columns operator</a><P>
- <li><a href=r38_0550.html#r38_0574>add_rows operator</a><P>
- <li><a href=r38_0550.html#r38_0575>add_to_columns operator</a><P>
- <li><a href=r38_0550.html#r38_0576>add_to_rows operator</a><P>
- <li><a href=r38_0550.html#r38_0577>augment_columns operator</a><P>
- <li><a href=r38_0550.html#r38_0578>band_matrix operator</a><P>
- <li><a href=r38_0550.html#r38_0579>block_matrix operator</a><P>
- <li><a href=r38_0550.html#r38_0580>char_matrix operator</a><P>
- <li><a href=r38_0550.html#r38_0581>char_poly operator</a><P>
- <li><a href=r38_0550.html#r38_0582>cholesky operator</a><P>
- <li><a href=r38_0550.html#r38_0583>coeff_matrix operator</a><P>
- <li><a href=r38_0550.html#r38_0584>column_dim operator</a><P>
- <li><a href=r38_0550.html#r38_0585>companion operator</a><P>
- <li><a href=r38_0550.html#r38_0586>copy_into operator</a><P>
- <li><a href=r38_0550.html#r38_0587>diagonal operator</a><P>
- <li><a href=r38_0550.html#r38_0588>extend operator</a><P>
- <li><a href=r38_0550.html#r38_0589>find_companion operator</a><P>
- <li><a href=r38_0550.html#r38_0590>get_columns operator</a><P>
- <li><a href=r38_0550.html#r38_0591>get_rows operator</a><P>
- <li><a href=r38_0550.html#r38_0592>gram_schmidt operator</a><P>
- <li><a href=r38_0550.html#r38_0593>hermitian_tp operator</a><P>
- <li><a href=r38_0550.html#r38_0594>hessian operator</a><P>
- <li><a href=r38_0550.html#r38_0595>hilbert operator</a><P>
- <li><a href=r38_0550.html#r38_0596>jacobian operator</a><P>
- <li><a href=r38_0550.html#r38_0597>jordan_block operator</a><P>
- <li><a href=r38_0550.html#r38_0598>lu_decom operator</a><P>
- <li><a href=r38_0550.html#r38_0599>make_identity operator</a><P>
- <li><a href=r38_0600.html#r38_0600>matrix_augment operator</a><P>
- <li><a href=r38_0600.html#r38_0601>matrixp operator</a><P>
- <li><a href=r38_0600.html#r38_0602>matrix_stack operator</a><P>
- <li><a href=r38_0600.html#r38_0603>minor operator</a><P>
- <li><a href=r38_0600.html#r38_0604>mult_columns operator</a><P>
- <li><a href=r38_0600.html#r38_0605>mult_rows operator</a><P>
- <li><a href=r38_0600.html#r38_0606>pivot operator</a><P>
- <li><a href=r38_0600.html#r38_0607>pseudo_inverse operator</a><P>
- <li><a href=r38_0600.html#r38_0608>random_matrix operator</a><P>
- <li><a href=r38_0600.html#r38_0609>remove_columns operator</a><P>
- <li><a href=r38_0600.html#r38_0610>remove_rows operator</a><P>
- <li><a href=r38_0600.html#r38_0611>row_dim operator</a><P>
- <li><a href=r38_0600.html#r38_0612>rows_pivot operator</a><P>
- <li><a href=r38_0600.html#r38_0613>simplex operator</a><P>
- <li><a href=r38_0600.html#r38_0614>squarep operator</a><P>
- <li><a href=r38_0600.html#r38_0615>stack_rows operator</a><P>
- <li><a href=r38_0600.html#r38_0616>sub_matrix operator</a><P>
- <li><a href=r38_0600.html#r38_0617>svd operator</a><P>
- <li><a href=r38_0600.html#r38_0618>swap_columns operator</a><P>
- <li><a href=r38_0600.html#r38_0619>swap_entries operator</a><P>
- <li><a href=r38_0600.html#r38_0620>swap_rows operator</a><P>
- <li><a href=r38_0600.html#r38_0621>symmetricp operator</a><P>
- <li><a href=r38_0600.html#r38_0622>toeplitz operator</a><P>
- <li><a href=r38_0600.html#r38_0623>vandermonde operator</a><P>
- </menu>
- <a name=r38_0625>
- <title>Smithex</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>SMITHEX</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- The operator <em>smithex</em> computes the Smith normal form S of a
- <a href=r38_0300.html#r38_0345>matrix</a> A (say). It returns {S,P,P^-1} where P
- *S*P^-1 = A.
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>smithex</em>(<matrix>,<variable>)
- <P>
- <P>
- <matrix> :- a rectangular
- <a href=r38_0300.html#r38_0345>matrix</a> of univariate polynomials in
- <variable>.
- <variable> :- the variable.
- <P>
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- a := mat((x,x+1),(0,3*x^2));
- [x x + 1]
- [ ]
- a := [ 2 ]
- [0 3*x ]
- smithex(a,x);
- [1 0 ] [1 0] [x x + 1]
- { [ ], [ ], [ ] }
- [ 3] [ 2 ] [ ]
- [0 x ] [3*x 1] [-3 -3 ]
- </tt></pre><p>
- <a name=r38_0626>
- <title>Smithex_int</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>SMITHEX\_INT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- The operator <em>smithex_int</em> performs the same task as <em>smithex</em>
- but on matrices containing only integer entries. Namely,
- <em>smithex_int</em> returns {S,P,P^-1} where S is the smith normal
- form of the input
- <a href=r38_0300.html#r38_0345>matrix</a> (A say), and P*S*P^-1 = A.
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>smithex_int</em>(<matrix>)
- <P>
- <P>
- <matrix> :- a rectangular
- <a href=r38_0300.html#r38_0345>matrix</a> of integer entries.
- <P>
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- a := mat((9,-36,30),(-36,192,-180),(30,-180,180));
- [ 9 -36 30 ]
- [ ]
- a := [-36 192 -180]
- [ ]
- [30 -180 180 ]
- smithex_int(a);
- [3 0 0 ] [-17 -5 -4 ] [1 -24 30 ]
- [ ] [ ] [ ]
- { [0 12 0 ], [64 19 15 ], [-1 25 -30] }
- [ ] [ ] [ ]
- [0 0 60] [-50 -15 -12] [0 -1 1 ]
- </tt></pre><p>
- <a name=r38_0627>
- <title>Frobenius</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>FROBENIUS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- The operator <em>frobenius</em> computes the <em>frobenius</em> normal form F of
- a
- <a href=r38_0300.html#r38_0345>matrix</a> (A say). It returns {F,P,P^-1} where P
- *F*P^-1 = A.
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>frobenius</em>(<matrix>)
- <P>
- <P>
- <matrix> :- a square
- <a href=r38_0300.html#r38_0345>matrix</a>.
- <P>
- <P>
- <P>
- Field Extensions:
- <P>
- <P>
- By default, calculations are performed in the rational numbers. To
- extend this field the
- <a href=r38_0600.html#r38_0635>arnum</a> package can be used. The package must
- first be loaded by load_package arnum;. The field can now be extended
- by using the defpoly command. For example, defpoly sqrt2**2-2; will
- extend the field to include the square root of 2 (now defined by sqrt2).
- <P>
- <P>
- Modular Arithmetic:
- <P>
- <P>
- <em>Frobenius</em>can also be calculated in a modular base. To do this
- first type on modular;. Then setmod p; (where p is a prime) will set
- the modular base of calculation to p. By further typing on balanced_mod
- the answer will appear using a symmetric modular representation. See
- <a href=r38_0600.html#r38_0628>ratjordan</a> for an example.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- a := mat((x,x^2),(3,5*x));
- [ 2 ]
- [x x ]
- a := [ ]
- [3 5*x]
- frobenius(a);
- [ 2] [1 x] [ - x ]
- { [0 - 2*x ], [ ], [1 -----] }
- [ ] [0 3] [ 3 ]
- [1 6*x ] [ ]
- [ 1 ]
- [0 --- ]
- [ 3 ]
- load_package arnum;
- defpoly sqrt2**2-2;
- a := mat((sqrt2,5),(7*sqrt2,sqrt2));
- [ sqrt2 5 ]
- a := [ ]
- [7*sqrt2 sqrt2]
- frobenius(a);
- [0 35*sqrt2 - 2] [1 sqrt2 ] [ 1 ]
- { [ ], [ ], [1 - --- ] }
- [1 2*sqrt2 ] [1 7*sqrt2] [ 7 ]
- [ ]
- [ 1 ]
- [0 ----*sqrt2]
- [ 14 ]
- </tt></pre><p>
- <a name=r38_0628>
- <title>Ratjordan</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>RATJORDAN</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- The operator <em>ratjordan</em> computes the rational Jordan normal form R
- of a
- <a href=r38_0300.html#r38_0345>matrix</a> (A say). It returns {R,P,P^-1} where P
- *R*P^-1 = A.
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>ratjordan</em>(<matrix>)
- <P>
- <P>
- <matrix> :- a square
- <a href=r38_0300.html#r38_0345>matrix</a>.
- <P>
- <P>
- <P>
- Field Extensions:
- <P>
- <P>
- By default, calculations are performed in the rational numbers. To
- extend this field the <em>arnum</em> package can be used. The package must
- first be loaded by load_package arnum;. The field can now be extended
- by using the defpoly command. For example, defpoly sqrt2**2-2; will
- extend the field to include the square root of 2 (now defined by sqrt2).
- See
- <a href=r38_0600.html#r38_0627>frobenius</a> for an example.
- <P>
- <P>
- Modular Arithmetic:
- <P>
- <P>
- <em>ratjordan</em>can also be calculated in a modular base. To do this
- first type on modular;. Then setmod p; (where p is a prime) will set
- the modular base of calculation to p. By further typing on balanced_mod
- the answer will appear using a symmetric modular representation.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- a := mat((5,4*x),(2,x^2));
- [5 4*x]
- [ ]
- a := [ 2 ]
- [2 x ]
- ratjordan(a);
- [0 x*( - 5*x + 8)] [1 5] [ -5 ]
- { [ ], [ ], [1 -----] }
- [ 2 ] [0 2] [ 2 ]
- [1 x + 5 ] [ ]
- [ 1 ]
- [0 -----]
- [ 2 ]
- on modular;
- setmod 23;
- a := mat((12,34),(56,78));
- [12 11]
- a := [ ]
- [10 9 ]
- ratjordan(a);
- [15 0] [16 8] [1 21]
- { [ ], [ ], [ ] }
- [0 6] [19 4] [1 4 ]
- on balanced_mod;
- ratjordan(a);
- [- 8 0] [ - 7 8] [1 - 2]
- { [ ], [ ], [ ] }
- [ 0 6] [ - 4 4] [1 4 ]
- </tt></pre><p>
- <a name=r38_0629>
- <title>Jordansymbolic</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>JORDANSYMBOLIC</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- The operator <em>jordansymbolic</em> computes the Jordan normal form J
- of a
- <a href=r38_0300.html#r38_0345>matrix</a> (A say). It returns {J,L,P,P^-1} where
-
- P*J*P^-1 = A. L = {ll,mm} where mm is a name and ll is a list of
- irreducible factors of p(mm).
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>jordansymbolic</em>(<matrix>)
- <P>
- <P>
- <matrix> :- a square
- <a href=r38_0300.html#r38_0345>matrix</a>.
- <P>
- <P>
- <P>
- Field Extensions:
- <P>
- <P>
- By default, calculations are performed in the rational numbers. To
- extend this field the
- <a href=r38_0600.html#r38_0635>arnum</a> package can be used. The package must
- first be loaded by load_package arnum;. The field can now be extended
- by using the defpoly command. For example, defpoly sqrt2**2-2; will
- extend the field to include the square root of 2 (now defined by sqrt2).
- See
- <a href=r38_0600.html#r38_0627>frobenius</a> for an example.
- <P>
- <P>
- Modular Arithmetic:
- <P>
- <P>
- <em>jordansymbolic</em>can also be calculated in a modular base. To do this
- first type on modular;. Then setmod p; (where p is a prime) will set
- the modular base of calculation to p. By further typing on balanced_mod
- the answer will appear using a symmetric modular representation. See
- <a href=r38_0600.html#r38_0628>ratjordan</a> for an example.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- a := mat((1,y),(2,5*y));
- [1 y ]
- a := [ ]
- [2 5*y]
- jordansymbolic(a);
- {
- [lambda11 0 ]
- [ ]
- [ 0 lambda12]
- ,
- 2
- lambda - 5*lambda*y - lambda + 3*y,lambda,
- [lambda11 - 5*y lambda12 - 5*y]
- [ ]
- [ 2 2 ]
- ,
- [ 2*lambda11 - 5*y - 1 5*lambda11*y - lambda11 - y + 1 ]
- [---------------------- ---------------------------------]
- [ 2 2 ]
- [ 25*y - 2*y + 1 2*(25*y - 2*y + 1) ]
- [ ]
- [ 2*lambda12 - 5*y - 1 5*lambda12*y - lambda12 - y + 1 ]
- [---------------------- ---------------------------------]
- [ 2 2 ]
- [ 25*y - 2*y + 1 2*(25*y - 2*y + 1) ]
- }
- </tt></pre><p>
- <a name=r38_0630>
- <title>Jordan</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>JORDAN</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- The operator <em>jordan</em> computes the Jordan normal form J
- of a
- <a href=r38_0300.html#r38_0345>matrix</a> (A say). It returns {J,P,P^-1} where P
- *J*P^-1 = A.
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>jordan</em>(<matrix>)
- <P>
- <P>
- <matrix> :- a square
- <a href=r38_0300.html#r38_0345>matrix</a>.
- <P>
- <P>
- <P>
- Field Extensions:
- By default, calculations are performed in the rational numbers. To
- extend this field the <em>arnum</em> package can be used. The package must
- first be loaded by load_package arnum;. The field can now be extended
- by using the defpoly command. For example, defpoly sqrt2**2-2; will
- extend the field to include the square root of 2 (now defined by sqrt2).
- See
- <a href=r38_0600.html#r38_0627>frobenius</a> for an example.
- <P>
- <P>
- Modular Arithmetic:
- <em>Jordan</em> can also be calculated in a modular base. To do this
- first type on modular;. Then setmod p; (where p is a prime) will set
- the modular base of calculation to p. By further typing on balanced_mod
- the answer will appear using a symmetric modular representation. See
- <a href=r38_0600.html#r38_0628>ratjordan</a> for an example.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- a := mat((1,x),(0,x));
- [1 x]
- a := [ ]
- [0 x]
- jordan(a);
- {
- [1 0]
- [ ]
- [0 x]
- ,
- [ 1 x ]
- [------- --------------]
- [ x - 1 2 ]
- [ x - 2*x + 1 ]
- [ ]
- [ 1 ]
- [ 0 ------- ]
- [ x - 1 ]
- ,
- [x - 1 - x ]
- [ ]
- [ 0 x - 1]
- }
- </tt></pre><p>
- <a name=r38_0631>
- <title>Matrix Normal Forms</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>Matrix Normal Forms</b><menu>
- <li><a href=r38_0600.html#r38_0625>Smithex operator</a><P>
- <li><a href=r38_0600.html#r38_0626>Smithex\_int operator</a><P>
- <li><a href=r38_0600.html#r38_0627>Frobenius operator</a><P>
- <li><a href=r38_0600.html#r38_0628>Ratjordan operator</a><P>
- <li><a href=r38_0600.html#r38_0629>Jordansymbolic operator</a><P>
- <li><a href=r38_0600.html#r38_0630>Jordan operator</a><P>
- </menu>
- <a name=r38_0632>
- <title>Miscellaneous_Packages</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>MISCELLANEOUS PACKAGES</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>introduction</b><P>
- <P>
-
- REDUCE includes a large number of packages that have been contributed by
- users from various fields. Some of these, together with their relevant
- commands, switches and so on (e.g., the NUMERIC package), have
- been described elsewhere. This section describes those packages for which
- no separate help material exists. Each has its own switches, commands,
- and operators, and some redefine special characters to aid in their
- notation. However, the brief descriptions given here do not include all
- such information. Readers are referred to the general package
- documentation in this case, which can be found, along with the source
- code, under the subdirectories <em>doc</em> and <em>src</em> in the
- <em>reduce</em> directory. The
- <a href=r38_0100.html#r38_0127>load_package</a> command is used to
- load the files you wish into your system. There will be a short delay
- while the package is loaded. A package cannot be unloaded. Once it
- is in your system, it stays there until you end the session. Each package
- also has a test file, which you will find under its name in the
- <em>$reduce/xmpl</em> directory.
- <P>
- <P>
- Finally, it should be mentioned that such user-contributed packages are
- unsupported; any questions or problems should be directed to their
- authors.
- <P>
- <P>
- <a name=r38_0633>
- <title>ALGINT_package</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>ALGINT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>package</b><P>
- <P>
-
- <P>
- <P>
- Author: James H. Davenport
- <P>
- <P>
- The <em>algint</em> package provides indefinite integration of square roots.
- This package, which is an extension of the basic integration package
- distributed with REDUCE, will analytically integrate a wide range of
- expressions involving square roots. The
- <a href=r38_0250.html#r38_0265>algint</a> switch provides for
- the use of the facilities given by the package, and is automatically turned
- on when the package is loaded. If you want to return to the standard
- integration algorithms, turn
- <a href=r38_0250.html#r38_0265>algint</a> off. An error message is given
- if you try to turn the
- <a href=r38_0250.html#r38_0265>algint</a> switch on when its package is not
- loaded.
- <P>
- <P>
- <a name=r38_0634>
- <title>APPLYSYM</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>APPLYSYM</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>package</b><P>
- <P>
-
- <P>
- <P>
- Author: Thomas Wolf
- <P>
- <P>
- This package provides programs APPLYSYM, QUASILINPDE and DETRAFO for
- computing with infinitesimal symmetries of differential equations.
- <P>
- <P>
- <a name=r38_0635>
- <title>ARNUM</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>ARNUM</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>package</b><P>
- <P>
-
- <P>
- <P>
- Author: Eberhard Schruefer
- <P>
- <P>
- This package provides facilities for handling algebraic numbers as polynomial
- coefficients in REDUCE calculations. It includes facilities for introducing
- indeterminates to represent algebraic numbers, for calculating splitting
- fields, and for factoring and finding greatest common divisors in such
- domains.
- <P>
- <P>
- <a name=r38_0636>
- <title>ASSIST</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>ASSIST</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>package</b><P>
- <P>
-
- <P>
- <P>
- Author: Hubert Caprasse
- <P>
- <P>
- ASSIST contains a large number of additional general purpose functions
- that allow a user to better adapt REDUCE to various calculational
- strategies and to make the programming task more straightforward and more
- efficient.
- <P>
- <P>
- <a name=r38_0637>
- <title>AVECTOR</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>AVECTOR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>package</b><P>
- <P>
-
- <P>
- <P>
- Author: David Harper
- <P>
- <P>
- This package provides REDUCE with the ability to perform vector algebra
- using the same notation as scalar algebra. The basic algebraic operations
- are supported, as are differentiation and integration of vectors with
- respect to scalar variables, cross product and dot product, component
- manipulation and application of scalar functions (e.g. cosine) to a vector
- to yield a vector result.
- <P>
- <P>
- <a name=r38_0638>
- <title>BOOLEAN</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>BOOLEAN</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>package</b><P>
- <P>
-
- <P>
- <P>
- Author: Herbert Melenk
- <P>
- <P>
- This package supports the computation with boolean expressions in the
- propositional calculus. The data objects are composed from algebraic
- expressions connected by the infix boolean operators and, or,
- implies, equiv, and the unary prefix operator not.
- Boolean allows you to simplify expressions built from these
- operators, and to test properties like equivalence, subset property etc.
- <P>
- <P>
- <a name=r38_0639>
- <title>CALI</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>CALI</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>package</b><P>
- <P>
-
- <P>
- <P>
- Author: Hans-Gert Gr"abe
- <P>
- <P>
- This package contains algorithms for computations in commutative algebra
- closely related to the Groebner algorithm for ideals and modules. Its
- heart is a new implementation of the Groebner algorithm that also allows
- for the computation of syzygies. This implementation is also applicable to
- submodules of free modules with generators represented as rows of a matrix.
- <P>
- <P>
- <a name=r38_0640>
- <title>CAMAL</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>CAMAL</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>package</b><P>
- <P>
-
- <P>
- <P>
- Author: John P. Fitch
- <P>
- <P>
- This package implements in REDUCE the Fourier transform procedures of the
- CAMAL package for celestial mechanics.
- <P>
- <P>
- <a name=r38_0641>
- <title>CHANGEVR</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>CHANGEVR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>package</b><P>
- <P>
-
- Author: G. Ucoluk
- <P>
- <P>
- This package provides facilities for changing the independent variables in
- a differential equation. It is basically the application of the chain rule.
- <P>
- <P>
- <a name=r38_0642>
- <title>COMPACT</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>COMPACT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>package</b><P>
- <P>
-
- <P>
- <P>
- Author: Anthony C. Hearn
- <P>
- <P>
- COMPACT is a package of functions for the reduction of a polynomial in the
- presence of side relations. COMPACT applies the side relations to the
- polynomial so that an equivalent expression results with as few terms as
- possible. For example, the evaluation of
- <P>
- <P>
- <p><pre><tt>
- compact(s*(1-sin x^2)+c*(1-cos x^2)+sin x^2+cos x^2,
- {cos x^2+sin x^2=1});
- </tt></pre><p>yields the result
- <p><pre><tt>
- 2 2
- SIN(X) *C + COS(X) *S + 1
- </tt></pre><p><P>
- <P>
- The first argument to the operator <em>compact</em> is the expression
- and the second is a list of side relations that can be
- equations or simple expressions (implicitly equated to zero). The
- kernels in the side relations may also be free variables with the
- same meaning as in rules, e.g.
- <p><pre><tt>
- sin_cos_identity := {cos ~w^2+sin ~w^2=1}$
- compact(u,in_cos_identity);
- </tt></pre><p><P>
- <P>
- Also the full rule syntax with the replacement operator is allowed here.
- <P>
- <P>
- <a name=r38_0643>
- <title>CRACK</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>CRACK</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>package</b><P>
- <P>
-
- <P>
- <P>
- Authors: Andreas Brand, Thomas Wolf
- <P>
- <P>
- CRACK is a package for solving overdetermined systems of partial or
- ordinary differential equations (PDEs, ODEs). Examples of programs which
- make use of CRACK for investigating ODEs (finding symmetries, first
- integrals, an equivalent Lagrangian or a ``differential factorization'') are
- included.
- <P>
- <P>
- <a name=r38_0644>
- <title>CVIT</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>CVIT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>package</b><P>
- <P>
-
- <P>
- <P>
- Authors: V.Ilyin, A.Kryukov, A.Rodionov, A.Taranov
- <P>
- <P>
- This package provides an alternative method for computing traces of Dirac
- gamma matrices, based on an algorithm by Cvitanovich that treats gamma
- matrices as 3-j symbols.
- <P>
- <P>
- <a name=r38_0645>
- <title>DEFINT</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>DEFINT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>package</b><P>
- <P>
-
- <P>
- <P>
- Authors: Kerry Gaskell, Stanley M. Kameny, Winfried Neun
- <P>
- <P>
- This package finds the definite integral of an expression in a stated
- interval. It uses several techniques, including an innovative approach
- based on the Meijer G-function, and contour integration.
- <P>
- <P>
- <a name=r38_0646>
- <title>DESIR</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>DESIR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>package</b><P>
- <P>
-
- <P>
- <P>
- Authors: C. Dicrescenzo, F. Richard-Jung, E. Tournier
- <P>
- <P>
- This package enables the basis of formal solutions to be computed for an
- ordinary homogeneous differential equation with polynomial coefficients
- over Q of any order, in the neighborhood of zero (regular or irregular
- singular point, or ordinary point).
- <P>
- <P>
- <a name=r38_0647>
- <title>DFPART</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>DFPART</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>package</b><P>
- <P>
-
- <P>
- <P>
- Author: Herbert Melenk
- <P>
- <P>
- This package supports computations with total and partial derivatives of
- formal function objects. Such computations can be useful in the context
- of differential equations or power series expansions.
- <P>
- <P>
- <a name=r38_0648>
- <title>DUMMY</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>DUMMY</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>package</b><P>
- <P>
-
- <P>
- <P>
- Author: Alain Dresse
- <P>
- <P>
- This package allows a user to find the canonical form of expressions
- involving dummy variables. In that way, the simplification of
- polynomial expressions can be fully done. The indeterminates are general
- operator objects endowed with as few properties as possible. In that way
- the package may be used in a large spectrum of applications.
- <P>
- <P>
- <a name=r38_0649>
- <title>EXCALC</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>EXCALC</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>package</b><P>
- <P>
-
- <P>
- <P>
- Author: Eberhard Schruefer
- <P>
- <P>
- The <em>excalc</em> package is designed for easy use by all who are familiar
- with the calculus of Modern Differential Geometry. The program is currently
- able to handle scalar-valued exterior forms, vectors and operations between
- them, as well as non-scalar valued forms (indexed forms). It is thus an ideal
- tool for studying differential equations, doing calculations in general
- relativity and field theories, or doing simple things such as calculating the
- Laplacian of a tensor field for an arbitrary given frame.
- <P>
- <P>
|