NORMFORM.TEX 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665
  1. \documentstyle[11pt,reduce]{article}
  2. \title{A \REDUCE{} package for the computation of several matrix
  3. normal forms}
  4. \author{Matt Rebbeck \\
  5. Konrad-Zuse-Zentrum f\"ur Informationstechnik Berlin}
  6. Heilbronner Strasse 10 \\
  7. D--10711 Berlin -- Wilmersdorf \\
  8. Federal Republic of Germany \\[0.05in]
  9. E--mail: neun@sc.zib--berlin.de \\[0.05in]
  10. }
  11. \date{February 1994}
  12. \begin{document}
  13. \maketitle
  14. \index{NORMFORM package}
  15. \section{Introduction}
  16. When are two given matrices similar? Similar matrices have the same
  17. trace, determinant, \hspace{0in} characteristic polynomial,
  18. \hspace{0in} and eigenvalues, \hspace{0in} but the matrices
  19. \begin{displaymath}
  20. \begin{array}{ccc} {\cal U} = \left( \begin{array}{cc} 0 & 1 \\ 0 &
  21. 0 \end{array} \right) & $and$ & {\cal V} = \left( \begin{array}{cc}
  22. 0 & 0 \\ 0 & 0 \end{array} \right) \end{array}
  23. \end{displaymath}
  24. are the same in all four of the above but are not similar. Otherwise
  25. there could exist a nonsingular ${\cal N} {\in} M_{2}$ (the set of
  26. all $2 \times 2$ matrices) such that ${\cal U} = {\cal N} \, {\cal V}
  27. \, {\cal N}^{-1} = {\cal N} \, {\it 0} \, {\cal N}^{-1} = {\it 0}$,
  28. which is a contradiction since ${\cal U} \neq {\it 0}$.
  29. Two matrices can look very different but still be similar. One
  30. approach to determining whether two given matrices are similar is to
  31. compute the normal form of them. If both matrices reduce to the same
  32. normal form they must be similar.
  33. {\small NORMFORM} is a package for computing the following normal
  34. forms of matrices:
  35. \begin{itemize}
  36. \begin{verbatim}
  37. - smithex
  38. - smithex_int
  39. - frobenius
  40. - ratjordan
  41. - jordansymbolic
  42. - jordan
  43. \end{verbatim}
  44. \end{itemize}
  45. The package is loaded by {\tt load\_package normform;}
  46. By default all calculations are carried out in {\cal Q} (the rational
  47. numbers). For {\tt smithex}, {\tt frobenius}, {\tt ratjordan},
  48. {\tt jordansymbolic}, and {\tt jordan}, this field can be extended.
  49. Details are given in the respective sections.
  50. The {\tt frobenius}, {\tt ratjordan}, and {\tt jordansymbolic} normal
  51. forms can also be computed in a modular base. Again, details are given
  52. in the respective sections.
  53. The algorithms for each routine are contained in the source code.
  54. {\small NORMFORM} has been converted from the normform and Normform
  55. packages written by T.M.L. Mulders and A.H.M. Levelt. These have been
  56. implemented in Maple [4].
  57. \section{smithex}
  58. \subsection{function}
  59. {\tt smithex}(${\cal A},\, x$) computes the Smith normal form ${\cal S}$
  60. of the matrix ${\cal A}$.
  61. It returns \{${\cal S}, {\cal P}, {\cal P}^{-1}$\} where ${\cal S},
  62. {\cal P}$, and ${\cal P}^{-1}$ are such that ${\cal P S P}^{-1} =
  63. {\cal A}$.
  64. ${\cal A}$ is a rectangular matrix of univariate polynomials in $x$.
  65. $x$ is the variable name.
  66. \subsection{field extensions}
  67. Calculations are performed in ${\cal Q}$. To extend this field the
  68. {\small ARNUM} package can be used. For details see {\it section} 8.
  69. \subsection{synopsis}
  70. \begin{itemize}
  71. \item The Smith normal form ${\cal S}$ of an n by m matrix ${\cal A}$
  72. with univariate polynomial entries in $x$ over a field {\it F} is
  73. computed. That is, the polynomials are then regarded as elements of the
  74. {\it E}uclidean domain {\it F}($x$).
  75. \item The Smith normal form is a diagonal matrix ${\cal S}$ where:
  76. \begin{itemize}
  77. \item rank(${\cal A}$) = number of nonzero rows (columns) of
  78. ${\cal S}$.
  79. \item ${\cal S}(i,\, i)$ is a monic polynomial for 0 $< i \leq $
  80. rank(${\cal A}$).
  81. \item ${\cal S}(i,\, i)$ divides ${\cal S}(i+1,\, i+1)$ for 0 $< i
  82. <$ rank(${\cal A}$).
  83. \item ${\cal S}(i,\,i)$ is the greatest common divisor of all $i$ by
  84. $i$ minors of ${\cal A}$.
  85. \end{itemize}
  86. Hence, if we have the case that $n = m$, as well as
  87. rank(${\cal A}$) $= n$, then product (${\cal S}(i,\,i),
  88. i=1\ldots n$) = det(${\cal A}$) / lcoeff(det$({\cal A}), \, x$).
  89. \item The Smith normal form is obtained by doing elementary row and
  90. column operations. This includes interchanging rows (columns),
  91. multiplying through a row (column) by $-1$, and adding integral
  92. multiples of one row (column) to another.
  93. \item Although the rank and determinant can be easily obtained from
  94. ${\cal S}$, this is not an efficient method for computing these
  95. quantities except that this may yield a partial factorization of
  96. det(${\cal A}$) without doing any explicit factorizations.
  97. \end{itemize}
  98. \subsection{example}
  99. {\tt load\_package normform;}
  100. \begin{displaymath}
  101. {\cal A} = \left( \begin{array}{cc} x & x+1 \\ 0 & 3*x^2 \end{array}
  102. \right)
  103. \end{displaymath}
  104. \begin{displaymath}
  105. \hspace{-0.5in}
  106. \begin{array}{ccc}
  107. {\tt smithex}({\cal A},\, x) & = &
  108. \left\{ \left( \begin{array}{cc} 1 & 0 \\
  109. 0 & x^3 \end{array} \right), \left( \begin{array}{cc} 1 & 0 \\ 3*x^2
  110. & 1 \end{array} \right), \left( \begin{array}{cc} x & x+1 \\ -3 & -3
  111. \end{array} \right) \right\} \end{array}
  112. \end{displaymath}
  113. \section{smithex\_int}
  114. \subsection{function}
  115. Given an $n$ by $m$ rectangular matrix ${\cal A}$ that contains
  116. {\it only} integer entries, {\tt smithex\_int}(${\cal A}$) computes the
  117. Smith normal form ${\cal S}$ of ${\cal A}$.
  118. It returns \{${\cal S}, {\cal P}, {\cal P}^{-1}$\} where ${\cal S},
  119. {\cal P}$, and ${\cal P}^{-1}$ are such that ${\cal P S P}^{-1} =
  120. {\cal A}$.
  121. \subsection{synopsis}
  122. \begin{itemize}
  123. \item The Smith normal form ${\cal S}$ of an $n$ by $m$ matrix
  124. ${\cal A}$ with integer entries is computed.
  125. \item The Smith normal form is a diagonal matrix ${\cal S}$ where:
  126. \begin{itemize}
  127. \item rank(${\cal A}$) = number of nonzero rows (columns) of
  128. ${\cal S}$.
  129. \item sign(${\cal S}(i,\, i)$) = 1 for 0 $< i \leq $ rank(${\cal A}$).
  130. \item ${\cal S}(i,\, i)$ divides ${\cal S}(i+1,\, i+1)$ for 0 $< i
  131. <$ rank(${\cal A}$).
  132. \item ${\cal S}(i,\,i)$ is the greatest common divisor of all $i$ by
  133. $i$ minors of ${\cal A}$.
  134. \end{itemize}
  135. Hence, if we have the case that $n = m$, as well as
  136. rank(${\cal A}$) $= n$, then abs(det(${\cal A}$)) =
  137. product(${\cal S}(i,\,i),i=1\ldots n$).
  138. \item The Smith normal form is obtained by doing elementary row and
  139. column operations. This includes interchanging rows (columns),
  140. multiplying through a row (column) by $-1$, and adding integral
  141. multiples of one row (column) to another.
  142. \end{itemize}
  143. \subsection{example}
  144. {\tt load\_package normform;}
  145. \begin{displaymath}
  146. {\cal A} = \left( \begin{array}{ccc} 9 & -36 & 30 \\ -36 & 192 & -180 \\
  147. 30 & -180 & 180 \end{array}
  148. \right)
  149. \end{displaymath}
  150. {\tt smithex\_int}(${\cal A}$) =
  151. \begin{center}
  152. \begin{displaymath}
  153. \left\{ \left( \begin{array}{ccc} 3 & 0 & 0 \\ 0 & 12 & 0 \\ 0 & 0 & 60
  154. \end{array} \right), \left( \begin{array}{ccc} -17 & -5 & -4 \\ 64 & 19
  155. & 15 \\ -50 & -15 & -12 \end{array} \right), \left( \begin{array}{ccc}
  156. 1 & -24 & 30 \\ -1 & 25 & -30 \\ 0 & -1 & 1 \end{array} \right) \right\}
  157. \end{displaymath}
  158. \end{center}
  159. \section{frobenius}
  160. \subsection{function}
  161. {\tt frobenius}(${\cal A}$) computes the Frobenius normal form
  162. ${\cal F}$ of the matrix ${\cal A}$.
  163. It returns \{${\cal F}, {\cal P}, {\cal P}^{-1}$\} where ${\cal F},
  164. {\cal P}$, and ${\cal P}^{-1}$ are such that ${\cal P F P}^{-1} =
  165. {\cal A}$.
  166. ${\cal A}$ is a square matrix.
  167. \subsection{field extensions}
  168. Calculations are performed in ${\cal Q}$. To extend this field the
  169. {\small ARNUM} package can be used. For details see {\it section} 8.
  170. \subsection{modular arithmetic}
  171. {\tt frobenius} can be calculated in a modular base. For details see
  172. {\it section} 9.
  173. \subsection{synopsis}
  174. \begin{itemize}
  175. \item ${\cal F}$ has the following structure:
  176. \begin{displaymath}
  177. {\cal F} = \left( \begin{array}{cccc} {\cal C}{\it p_{1}} & & &
  178. \\ & {\cal C}{\it p_{2}} & & \\ & & \ddots & \\ & & &
  179. {\cal C}{\it p_{k}} \end{array} \right)
  180. \end{displaymath}
  181. where the ${\cal C}({\it p_{i}})$'s are companion matrices
  182. associated with polynomials ${\it p_{1}, p_{2}},\ldots,
  183. {\it p_{k}}$, with the property that ${\it p_{i}}$ divides
  184. ${\it p_{i+1}}$ for $i =1\ldots k-1$. All unmarked entries are
  185. zero.
  186. \item The Frobenius normal form defined in this way is unique (ie: if
  187. we require that ${\it p_{i}}$ divides ${\it p_{i+1}}$ as above).
  188. \end{itemize}
  189. \subsection{example}
  190. {\tt load\_package normform;}
  191. \begin{displaymath}
  192. {\cal A} = \left( \begin{array}{cc} \frac{-x^2+y^2+y}{y} &
  193. \frac{-x^2+x+y^2-y}{y} \\ \frac{-x^2-x+y^2+y}{y} & \frac{-x^2+x+y^2-y}
  194. {y} \end{array} \right)
  195. \end{displaymath}
  196. {\tt frobenius}(${\cal A}$) =
  197. \begin{center}
  198. \begin{displaymath}
  199. \left\{ \left( \begin{array}{cc} 0 & \frac{x*(x^2-x-y^2+y)}{y} \\ 1 &
  200. \frac{-2*x^2+x+2*y^2}{y} \end{array} \right), \left( \begin{array}{cc}
  201. 1 & \frac{-x^2+y^2+y}{y} \\ 0 & \frac{-x^2-x+y^2+y}{y} \end{array}
  202. \right), \left( \begin{array}{cc} 1 & \frac{-x^2+y^2+y}{x^2+x-y^2-y} \\
  203. 0 & \frac{-y}{x^2+x-y^2-y} \end{array} \right) \right\}
  204. \end{displaymath}
  205. \end{center}
  206. \section{ratjordan}
  207. \subsection{function}
  208. {\tt ratjordan}(${\cal A}$) computes the rational Jordan normal form
  209. ${\cal R}$ of the matrix ${\cal A}$.
  210. It returns \{${\cal R}, {\cal P}, {\cal P}^{-1}$\} where ${\cal R},
  211. {\cal P}$, and ${\cal P}^{-1}$ are such that ${\cal P R P}^{-1} =
  212. {\cal A}$.
  213. ${\cal A}$ is a square matrix.
  214. \subsection{field extensions}
  215. Calculations are performed in ${\cal Q}$. To extend this field the
  216. {\small ARNUM} package can be used. For details see {\it section} 8.
  217. \subsection{modular arithmetic}
  218. {\tt ratjordan} can be calculated in a modular base. For details see
  219. {\it section} 9.
  220. \subsection{synopsis}
  221. \begin{itemize}
  222. \item ${\cal R}$ has the following structure:
  223. \begin{displaymath}
  224. {\cal R} = \left( \begin{array}{cccccc} {\it r_{11}} \\ &
  225. {\it r_{12}} \\ & & \ddots \\ & & & {\it r_{21}} \\ & &
  226. & & {\it r_{22}} \\ & & & & & \ddots \end{array} \right)
  227. \end{displaymath}
  228. The ${\it r_{ij}}$'s have the following shape:
  229. \begin{displaymath}
  230. {\it r_{ij}} = \left( \begin{array}{ccccc} {\cal C}({\it p}) &
  231. {\cal I} & & & \\ & {\cal C}({\it p}) & {\cal I} & & \\ &
  232. & \ddots & \ddots & \\ & & & {\cal C}({\it p}) & {\cal I} \\ &
  233. & & & {\cal C}({\it p}) \end{array} \right)
  234. \end{displaymath}
  235. where there are e${\it ij}$ times ${\cal C}({\it p})$ blocks
  236. along the diagonal and ${\cal C}({\it p})$ is the companion
  237. matrix associated with the irreducible polynomial ${\it p}$. All
  238. unmarked entries are zero.
  239. \end{itemize}
  240. \subsection{example}
  241. {\tt load\_package normform;}
  242. \begin{displaymath}
  243. {\cal A} = \left( \begin{array}{cc} x+y & 5 \\ y & x^2 \end{array}
  244. \right)
  245. \end{displaymath}
  246. {\tt ratjordan}(${\cal A}$) =
  247. \begin{center}
  248. \begin{displaymath}
  249. \left\{ \left( \begin{array}{cc} 0 & -x^3-x^2*y+5*y \\ 1 &
  250. x^2+x+y \end{array} \right), \left( \begin{array}{cc}
  251. 1 & x+y \\ 0 & y \end{array} \right), \left( \begin{array}{cc} 1 &
  252. \frac{-(x+y)}{y} \\ 0 & \hspace{0.2in} \frac{1}{y} \end{array} \right)
  253. \right\}
  254. \end{displaymath}
  255. \end{center}
  256. \section{jordansymbolic}
  257. \subsection{function}
  258. {\tt jordansymbolic}(${\cal A}$) \hspace{0in} computes the Jordan
  259. normal form ${\cal J}$of the matrix ${\cal A}$.
  260. It returns \{${\cal J}, {\cal L}, {\cal P}, {\cal P}^{-1}$\}, where
  261. ${\cal J}, {\cal P}$, and ${\cal P}^{-1}$ are such that ${\cal P J P}^
  262. {-1} = {\cal A}$. ${\cal L}$ = \{ {\it ll} , $\xi$ \}, where $\xi$ is
  263. a name and {\it ll} is a list of irreducible factors of ${\it p}(\xi)$.
  264. ${\cal A}$ is a square matrix.
  265. \subsection{field extensions}
  266. Calculations are performed in ${\cal Q}$. To extend this field the
  267. {\small ARNUM} package can be used. For details see {\it section} 8.
  268. \subsection{modular arithmetic}
  269. {\tt jordansymbolic} can be calculated in a modular base. For details
  270. see {\it section} 9.
  271. \subsection{extras}
  272. If using {\tt xr}, the X interface for \REDUCE, the appearance of the
  273. output can be improved by switching {\tt on looking\_good;}. This
  274. converts all lambda to $\xi$ and improves the indexing, eg: lambda12
  275. $\Rightarrow \xi_{12}$. The example ({\it section} 6.6) shows the
  276. output when this switch is on.
  277. \subsection{synopsis}
  278. \begin{itemize}
  279. \item A {\it Jordan block} ${\jmath}_{k}(\lambda)$ is a $k$ by $k$
  280. upper triangular matrix of the form:
  281. \begin{displaymath}
  282. {\jmath}_{k}(\lambda) = \left( \begin{array}{ccccc} \lambda & 1
  283. & & & \\ & \lambda & 1 & & \\ &
  284. & \ddots & \ddots & \\ & & & \lambda & 1 \\ &
  285. & & & \lambda \end{array} \right)
  286. \end{displaymath}
  287. There are $k-1$ terms ``$+1$'' in the superdiagonal; the scalar
  288. $\lambda$ appears $k$ times on the main diagonal. All other
  289. matrix entries are zero, and ${\jmath}_{1}(\lambda) = (\lambda)$.
  290. \item A Jordan matrix ${\cal J} \in M_{n}$ (the set of all $n$ by $n$
  291. matrices) is a direct sum of {\it jordan blocks}.
  292. \begin{displaymath}
  293. {\cal J} = \left( \begin{array}{cccc} \jmath_{n_1}(\lambda_{1})
  294. \\ & \jmath_{n_2}(\lambda_{2}) \\ & & \ddots \\ & & &
  295. \jmath_{n_k}(\lambda_{k}) \end{array} \right),
  296. {\it n}_{1}+{\it n}_{2}+\cdots +{\it n}_{k} = n
  297. \end{displaymath}
  298. in which the orders ${\it n}_{i}$ may not be distinct and the
  299. values ${\lambda_{i}}$ need not be distinct.
  300. \item Here ${\lambda}$ is a zero of the characteristic polynomial
  301. ${\it p}$ of ${\cal A}$. If ${\it p}$ does not split completely,
  302. symbolic names are chosen for the missing zeroes of ${\it p}$.
  303. If, by some means, one knows such missing zeroes, they can be
  304. substituted for the symbolic names. For this,
  305. {\tt jordansymbolic} actually returns $\{ {\cal J,L,P,P}^{-1} \}$.
  306. ${\cal J}$ is the Jordan normal form of ${\cal A}$ (using
  307. symbolic names if necessary). ${\cal L} = \{ {\it ll}, \xi \}$,
  308. where $\xi$ is a name and ${\it ll}$ is a list of irreducible
  309. factors of ${\it p}(\xi)$. If symbolic names are used then
  310. ${\xi}_{ij}$ is a zero of ${\it ll}_{i}$. ${\cal P}$ and
  311. ${\cal P}^{-1}$ are as above.
  312. \end{itemize}
  313. \subsection{example}
  314. {\tt load\_package normform;}\\
  315. {\tt on looking\_good;}
  316. \begin{displaymath}
  317. {\cal A} = \left( \begin{array}{cc} 1 & y \\ y^2 & 3 \end{array}
  318. \right)
  319. \end{displaymath}
  320. {\tt jordansymbolic}(${\cal A}$) =
  321. \begin{eqnarray}
  322. & & \left\{ \left( \begin{array}{cc} \xi_{11} & 0 \\ 0 & \xi_{12}
  323. \end{array} \right) ,
  324. \left\{ \left\{ -y^3+\xi^2-4*\xi+3 \right\}, \xi \right\}, \right.
  325. \nonumber \\ & & \hspace{0.1in} \left. \left( \begin{array}{cc}
  326. \xi_{11} -3 & \xi_{12} -3 \\ y^2 & y^2
  327. \end{array} \right), \left( \begin{array}{cc} \frac{\xi_{11} -2}
  328. {2*(y^3-1)} & \frac{\xi_{11} + y^3 -1}{2*y^2*(y^3+1)} \\
  329. \frac{\xi_{12} -2}{2*(y^3-1)} & \frac{\xi_{12}+y^3-1}{2*y^2*(y^3+1)}
  330. \end{array} \right) \right\} \nonumber
  331. \end{eqnarray}
  332. \vspace{0.2in}
  333. \begin{flushleft}
  334. \begin{math}
  335. {\tt solve(-y^3+xi^2-4*xi+3,xi)}${\tt ;}$
  336. \end{math}
  337. \end{flushleft}
  338. \vspace{0.1in}
  339. \begin{center}
  340. \begin{math}
  341. \{ \xi = \sqrt{y^3+1} + 2,\, \xi = -\sqrt{y^3+1}+2 \}
  342. \end{math}
  343. \end{center}
  344. \vspace{0.1in}
  345. \begin{math}
  346. {\tt {\cal J} = sub}{\tt (}{\tt \{ xi(1,1)=sqrt(y^3+1)+2,\, xi(1,2) =
  347. -sqrt(y^3+1)+2\},}
  348. \end{math}
  349. \\ \hspace*{0.29in} {\tt first jordansymbolic (${\cal A}$));}
  350. \vspace{0.2in}
  351. \begin{displaymath}
  352. {\cal J} = \left( \begin{array}{cc} \sqrt{y^3+1} + 2 & 0 \\ 0 &
  353. -\sqrt{y^3+1} + 2 \end{array} \right)
  354. \end{displaymath}
  355. \vspace{0.2in}
  356. For a similar example ot this in standard {\REDUCE} (ie: not using
  357. {\tt xr}), see the {\it normform.log} file.
  358. \vspace{0.5in}
  359. \section{jordan}
  360. \subsection{function}
  361. {\tt jordan}(${\cal A}$) computes the Jordan normal form
  362. ${\cal J}$ of the matrix ${\cal A}$.
  363. It returns \{${\cal J}, {\cal P}, {\cal P}^{-1}$\}, where
  364. ${\cal J}, {\cal P}$, and ${\cal P}^{-1}$ are such that ${\cal P J P}^
  365. {-1} = {\cal A}$.
  366. ${\cal A}$ is a square matrix.
  367. \subsection{field extensions}
  368. Calculations are performed in ${\cal Q}$. To extend this field the
  369. {\small ARNUM} package can be used. For details see {\it section} 8.
  370. \subsection{note}
  371. In certain polynomial cases {\tt fullroots} is turned on to compute the
  372. zeroes. This can lead to the calculation taking a long time, as well as
  373. the output being very large. In this case a message {\tt ***** WARNING:
  374. fullroots turned on. May take a while.} will be printed. It may be
  375. better to kill the calculation and compute {\tt jordansymbolic} instead.
  376. \subsection{synopsis}
  377. \begin{itemize}
  378. \item The Jordan normal form ${\cal J}$ with entries in an algebraic
  379. extension of ${\cal Q}$ is computed.
  380. \item A {\it Jordan block} ${\jmath}_{k}(\lambda)$ is a $k$ by $k$
  381. upper triangular matrix of the form:
  382. \begin{displaymath}
  383. {\jmath}_{k}(\lambda) = \left( \begin{array}{ccccc} \lambda & 1
  384. & & & \\ & \lambda & 1 & & \\ &
  385. & \ddots & \ddots & \\ & & & \lambda & 1 \\ &
  386. & & & \lambda \end{array} \right)
  387. \end{displaymath}
  388. There are $k-1$ terms ``$+1$'' in the superdiagonal; the scalar
  389. $\lambda$ appears $k$ times on the main diagonal. All other
  390. matrix entries are zero, and ${\jmath}_{1}(\lambda) = (\lambda)$.
  391. \item A Jordan matrix ${\cal J} \in M_{n}$ (the set of all $n$ by $n$
  392. matrices) is a direct sum of {\it jordan blocks}.
  393. \begin{displaymath}
  394. {\cal J} = \left( \begin{array}{cccc} \jmath_{n_1}(\lambda_{1})
  395. \\ & \jmath_{n_2}(\lambda_{2}) \\ & & \ddots \\ & & &
  396. \jmath_{n_k}(\lambda_{k}) \end{array} \right),
  397. {\it n}_{1}+{\it n}_{2}+\cdots +{\it n}_{k} = n
  398. \end{displaymath}
  399. in which the orders ${\it n}_{i}$ may not be distinct and the
  400. values ${\lambda_{i}}$ need not be distinct.
  401. \item Here ${\lambda}$ is a zero of the characteristic polynomial
  402. ${\it p}$ of ${\cal A}$. The zeroes of the characteristic
  403. polynomial are computed exactly, if possible. Otherwise they are
  404. approximated by floating point numbers.
  405. \end{itemize}
  406. \subsection{example}
  407. {\tt load\_package normform;}
  408. \begin{displaymath}
  409. {\cal A} = \left( \begin{array}{cccccc} -9 & -21 & -15 & 4 & 2 & 0 \\
  410. -10 & 21 & -14 & 4 & 2 & 0 \\ -8 & 16 & -11 & 4 & 2 & 0 \\ -6 & 12 & -9
  411. & 3 & 3 & 0 \\ -4 & 8 & -6 & 0 & 5 & 0 \\ -2 & 4 & -3 & 0 & 1 & 3
  412. \end{array} \right)
  413. \end{displaymath}
  414. \begin{flushleft}
  415. {\tt ${\cal J}$ = first jordan$({\cal A})$;}
  416. \end{flushleft}
  417. \begin{displaymath}
  418. {\cal J} = \left( \begin{array}{cccccc} 3 & 0 & 0 & 0 & 0 & 0 \\ 0 & 3
  419. & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 \\
  420. 0 & 0 & 0 & 0 & i+2 & 0 \\ 0 & 0 & 0 & 0 & 0 & -i+2
  421. \end{array} \right)
  422. \end{displaymath}
  423. \newpage
  424. \section{arnum}
  425. The package is loaded by {\tt load\_package arnum;}. The algebraic
  426. field ${\cal Q}$ can now be extended. For example, {\tt defpoly
  427. sqrt2**2-2;} will extend it to include ${\sqrt{2}}$ (defined here by
  428. {\tt sqrt2}). The {\small ARNUM} package was written by Eberhard
  429. Schr\"ufer and is described in the {\it arnum.tex} file.
  430. \subsection{example}
  431. {\tt load\_package normform;} \\
  432. {\tt load\_package arnum;} \\
  433. {\tt defpoly sqrt2**2-2;} \\
  434. (sqrt2 now changed to ${\sqrt{2}}$ for looks!)
  435. \vspace{0.2in}
  436. \begin{displaymath}
  437. {\cal A} = \left( \begin{array}{ccc} 4*{\sqrt{2}}-6 & -4*{\sqrt{2}}+7 &
  438. -3*{\sqrt{2}}+6 \\ 3*{\sqrt{2}}-6 & -3*{\sqrt{2}}+7 & -3*{\sqrt{2}}+6
  439. \\ 3*{\sqrt{2}} & 1-3*{\sqrt{2}} & -2*{\sqrt{2}} \end{array} \right)
  440. \end{displaymath}
  441. \vspace{0.2in}
  442. \begin{eqnarray}
  443. {\tt ratjordan}({\cal A}) & = &
  444. \left\{ \left( \begin{array}{ccc} {\sqrt{2}} & 0 & 0 \\ 0 & {\sqrt{2}}
  445. & 0 \\ 0 & 0 & -3*{\sqrt{2}}+1 \end{array} \right), \right. \nonumber
  446. \\ & & \hspace{0.1in} \left. \left( \begin{array}{ccc} 7*{\sqrt{2}}-6
  447. & \frac{2*{\sqrt{2}}-49}{31} & \frac{-21*{\sqrt{2}}+18}{31} \\
  448. 3*{\sqrt{2}}-6 & \frac{21*{\sqrt{2}}-18}{31} & \frac{-21*{\sqrt{2}}+18}
  449. {31} \\ 3*{\sqrt{2}}+1 & \frac{-3*{\sqrt{2}}+24}{31} &
  450. \frac{3*{\sqrt{2}}-24}{31} \end{array} \right), \right. \nonumber \\ &
  451. & \hspace{0.1in} \left. \left( \begin{array}{ccc} 0 & {\sqrt{2}}+1 &
  452. 1 \\ -1 & 4*{\sqrt{2}}+9 & 4*{\sqrt{2}} \\ -1 & -\frac{1}{6}*{\sqrt{2}}
  453. +1 & 1 \end{array} \right) \right\} \nonumber
  454. \end{eqnarray}
  455. \newpage
  456. \section{modular}
  457. Calculations can be performed in a modular base by switching {\tt on
  458. modular;}. The base can then be set by {\tt setmod p;} (p a prime). The
  459. normal form will then have entries in ${\cal Z}/$p${\cal Z}$.
  460. By also switching {\tt on balanced\_mod;} the output will be shown using
  461. a symmetric modular representation.
  462. Information on this modular manipulation can be found in {\it chapter}
  463. 9 (Polynomials and Rationals) of the {\REDUCE} User's Manual [5].
  464. \subsection{example}
  465. {\tt load\_package normform;} \\
  466. {\tt on modular;} \\
  467. {\tt setmod 23;}
  468. \vspace{0.1in}
  469. \begin{displaymath}
  470. {\cal A} = \left( \begin{array}{cc} 10 & 18 \\ 17 & 20 \end{array}
  471. \right)
  472. \end{displaymath}
  473. {\tt jordansymbolic}(${\cal A}$) =
  474. \begin{center}
  475. \begin{displaymath}
  476. \left\{ \left( \begin{array}{cc} 18 & 0 \\ 0 & 12 \end{array} \right),
  477. \left\{ \left\{ \lambda + 5, \lambda + 11 \right\}, \lambda \right\},
  478. \left( \begin{array}{cc} 15 & 9 \\ 22 & 1 \end{array} \right), \left(
  479. \begin{array}{cc} 1 & 14 \\ 1 & 15 \end{array} \right) \right\}
  480. \end{displaymath}
  481. \end{center}
  482. \vspace{0.2in}
  483. {\tt on balanced\_mod;}
  484. \vspace{0.2in}
  485. {\tt jordansymbolic}(${\cal A}$) =
  486. \begin{center}
  487. \begin{displaymath}
  488. \left\{ \left( \begin{array}{cc} -5 & 0 \\ 0 & -11 \end{array} \right),
  489. \left\{ \left\{ \lambda + 5, \lambda + 11 \right\}, \lambda \right\},
  490. \left( \begin{array}{cc} -8 & 9 \\ -1 & 1 \end{array} \right), \left(
  491. \begin{array}{cc} 1 & -9 \\ 1 & -8 \end{array} \right) \right\}
  492. \end{displaymath}
  493. \end{center}
  494. \newpage
  495. \begin{thebibliography}{6}
  496. \bibitem{MulLev} T.M.L.Mulders and A.H.M. Levelt: {\it The Maple
  497. normform and Normform packages.} (1993)
  498. \bibitem{Mulders} T.M.L.Mulders: {\it Algoritmen in De Algebra, A
  499. Seminar on Algebraic Algorithms, Nigmegen.} (1993)
  500. \bibitem{HoJo} Roger A. Horn and Charles A. Johnson: {\it Matrix
  501. Analysis.} Cambridge University Press (1990)
  502. \bibitem{Maple} Bruce W. Chat\ldots [et al.]: {\it Maple (Computer
  503. Program)}. Springer-Verlag (1991)
  504. \bibitem{Reduce} Anthony C. Hearn: {\REDUCE} {\it User's Manual 3.6.}
  505. RAND (1995)
  506. \end{thebibliography}
  507. \end{document}