|Even More Results with Matrices|
Message #1 Posted by Palmer O. Hanson, Jr. on 29 May 2005, 11:10 p.m.
During the thread "More matrix results on HP and TI machines" back in April Gene Wright posted the determinant and the inverse for Valentin Albillo's matrix number 1 as obtained with the TI CC-40 Mathematics module. Valentin requested some additional results. One of the major deficiencies of the CC-40 is that when a Solid State Cartridge program is operated from the keyboard the results are brought to the display in a form that does not permit additional calculations on the result without reentering the value. Thus, the results that Valentin requested are not easy to obtain when using the CC-40 Mathematics module from the keyboard. The results are readily obtainable when calling the routines in the Mathematics module from a program. I was busy for most of May with moving to our summer home and with the marriage of my son. I have finally written programs that access the Mathematics module routines. Results obtained for Albillo 1 follow.
Determinant of Albillo 1 to more significant figures: 1.0028267103
Determinant of the computed inverse of Albillo 1: -0.9971504614
Determinant of the product of Albillo 1 and its computed inverse: 0.997159035
The incorrect sign for the determinant of the computed inverse is an error that occasionally occurs with the Mathematics module in the CC-40. I noted a single occurence of that error in the early days of the CC-40 and reported the problem to TI. The error was eliminated in the Mathematics module for the TI-74.
Product of Albillo 1 and its inverse:
1.0001 -0.000002 0 0 0 0.0001 0
0 1 0 -0.0001 0 0.0001 -0.0001
-0.0001 0 0.999999 0.0001 0.0001 0 0
-0.0001 0 0 1.000007 -0.0001 0.0001 0.0002
-0.0002 -0.000001 0.000001 0.0001 0.9999 0.0001 0.0002
0 0 0.000001 0.0001 0.0001 1 0.0001
0.003 0.000009 -0.000016 0.0001 -0.0003 0.001 0.9971
Row norm = 0.007325
Column norm = 0.0035
Frobenius norm = 0.0043359421
where, as suggested by Rodger Rosenbaum, the identity matrix was subtracted from the product of the matrix and its inverse before calculatiing the norms. Many of the elements, the ones and zeroes, seem to be to good to be true, and I have always paid homage to the old adage that says "If it seems too good to be true, it probably is." The calculation of the (1,1) element of the product of the matrix A and its inverse C is A(1,1)x C(1,1) + A(1,2)xC(2,1) ... ... A(1,7)xC(7,1) and listing the products of the actual matrix elements in order yields
58 x 96088630.278672 = 5573140556.1630
71 x 4467.3718497165 = 317183.40132987
67 x -39324.8401.9987 = -2634764.293391
36 x 272469.8067209 = 9808913.041952
35 x -1840970.110491 = -64433953.867185
19 x 13113279.556936 = 249152311.5818
60 x -96089170.750456 = -5765350245.0274
Pencil and Paper Sum = 1.00010587
CC-40 Math Module Sum = 1.0001
where the program completes the sum of the products in sequence and in essence throws away digits beyond the fourth digit to the right of the decimal point because of the larger magnitude of the first product. One can obtain the "Pencil and Paper" sums in a program by summing the integer and fractional portions of each product separately and and combining the two sums when storing the calculated element in the solution matrix. I admit that in the real world one must be careful when playing around with numbers in this way but I did it anyway out of curiosity. The revised product of Albillo 1 and its inverse is
1.00010587 -0.0000005434 0.0000001352 -0.0000158544 -0.0001134 0.0001122 0.00000113
0.00001387 0.9999994058 -0.0000003548 -0.0000050844 -0.00005402 0.00005084 -0.00001387
-0.00009634 -0.0000003764 0.9999994508 0.000040054 0.00000726 0.00002209 0.0000548
-0.00009494 0.0000004173 0.0000002775 1.000007241 -0.00009058 0.00004022 0.00010816
-0.00020652 -0.0000014466 0.0000002842 0.0000195828 0.99997651 0.00000264 0.00021756
-0.00004683 -0.0000004497 0.0000006379 0.000049836 0.000046956 1.00005925 0.0000562
0.00294259 0.0000088494 -0.0000161785 0.0001265592 -0.0035169 0.00094542 0.99710385
Determinant = 0.9972511401
Row norm = 0.0072874371
Column norm = 0.00350696
Frobenius norm = 0.0042746581
Not surprisingly, the norms did not change very much.
Some arithmetic on another machine:
Back in the 1980's one of the benchmark tests that we used was the solution of a set of linear equations where the matrix was the seventh order sub-Hilbert A(i,j) = 1/(i + j) and the vector was a column of seven ones. The exact solution and the solution obtained using the HP-41 Math Pac are
Exact Math Pac
which yields an RMS relative error for the Math Pac solution of 0.859E-02. It was suggested that we should use another way of assessing the quality of the result, namely, multiplying the matrix by the solution and comparing the result to a column of ones. When I multiplied the first row of the matrix by the solution and added in order from the top, i.e., .3333333333 x 56.666735 + ... I received exactly one as the answer. Of course, that set off my ingrained suspicion of answer that seem to be too good to be true. I added the products in the reverse order and received 0.999999600 as the answer. I calculated the sums for the remaining elements as
where for this problem it appears that the arithmetic is not consistent with the commutative law of addition. Examination of the details of the calculation shows that the effect are similar to those seen with the product of Albillo 1 and its inverse on the CC-40. For the fifth element above the calculations are
1/6 x 56.666735 = 9.444455835
1/7 x -1527.38319 = -218.1975886
1/8 x 12712.24137 = 1589.030171
1/9 x -46566.496 = -5174.055111
1/10 x 83755.0102 = 837.50102
1/11 x -72541.81401 = -6594.710365
1/12 x 24167.84911 = 2013.97426
where the pencil and paper sum and the backward sum are both 0.999998235. The forward sum throws away some of the less significant digits from the first two products when the third product is added..
Still to be completed: CC-40 solutions for Albillo 2 and Albillo 3.
CAUTION: I do not have my printer with me so all of the presented results have been transferred by hand from the display of the CC-40 or HP-41 to my word processor. I have proofread the numbers twice, but the possibility exists that I may have entered a typo or two. I submit in my defense the following quotation from page 634 of Volume I of Donbald Knuth's The Art of Computer Programming -- "Any inaccuracies in this index may be explained by the fact that it has been prepared with the help of a computer." In that spirit I note the following typographic errors in the earlier thread:
1. In Rodger's submission of April 24 the numerical sequence after the sixth paragraph should have one more zero in each denominator.
2. In Gene's submission of April 27 of more significant digits for the inverse of Albillo 1 th last element in he third row should have a decimal point between the 5 and the 6.