This file is indexed.

/usr/share/doc/maxima-doc/html/maxima_23.html is in maxima-doc 5.27.0-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on May, 9 2012 by texi2html 1.76 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people <dev@texi2html.cvshome.org>
Send bugs and suggestions to <users@texi2html.cvshome.org>

-->
<head>
<title>Maxima 5.27.0 Manual: 23. Matrices and Linear Algebra</title>

<meta name="description" content="Maxima 5.27.0 Manual: 23. Matrices and Linear Algebra">
<meta name="keywords" content="Maxima 5.27.0 Manual: 23. Matrices and Linear Algebra">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.76">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
body
{
    color: black;
    background: white; 
    margin-left: 8%;
    margin-right: 13%;
}

h1
{
    margin-left: +8%;
    font-size: 150%;
    font-family: sans-serif
}

h2
{
    font-size: 125%;
    font-family: sans-serif
}

h3
{
    font-size: 100%;
    font-family: sans-serif
}

h2,h3,h4,h5,h6 { margin-left: +4%; }

div.textbox
{
    border: solid;
    border-width: thin;
    /* width: 100%; */
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 2em;
    padding-right: 2em
}

div.titlebox
{
    border: none;
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 2em;
    padding-right: 2em;
    background: rgb(200,255,255);
    font-family: sans-serif
}

div.synopsisbox
{
    border: none;
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 2em;
    padding-right: 2em;
     background: rgb(255,220,255);
    /*background: rgb(200,255,255); */
    /* font-family: fixed */
}

pre.example
{
    border: 1px solid gray;
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 1em;
    padding-right: 1em;
    /* background: rgb(247,242,180); */ /* kind of sandy */
    /* background: rgb(200,255,255); */ /* sky blue */
    background-color: #F1F5F9; /* light blue-gray */
    /* font-family: "Lucida Console", monospace */
}

div.spacerbox
{
    border: none;
    padding-top: 2em;
    padding-bottom: 2em
}

div.image
{
    margin: 0;
    padding: 1em;
    text-align: center;
}

div.categorybox
{
    border: 1px solid gray;
    padding-top: 0px;
    padding-bottom: 0px;
    padding-left: 1em;
    padding-right: 1em;
    background: rgb(247,242,220);
}


-->
</style>

<link rel="icon" href="http://maxima.sourceforge.net/favicon.ico"/>
</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="Matrices-and-Linear-Algebra"></a>
<a name="SEC112"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="maxima_22.html#SEC111" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC113" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima_22.html#SEC107" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_24.html#SEC118" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_83.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 23. Matrices and Linear Algebra </h1>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC113">23.1 Introduction to Matrices and Linear Algebra</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">  
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC117">23.2 Functions and Variables for Matrices and Linear Algebra</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">  
</td></tr>
</table>

<p><a name="Item_003a-Introduction-to-Matrices-and-Linear-Algebra"></a>
</p><hr size="6">
<a name="Introduction-to-Matrices-and-Linear-Algebra"></a>
<a name="SEC113"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC112" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC114" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC112" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC112" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_24.html#SEC118" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_83.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 23.1 Introduction to Matrices and Linear Algebra </h2>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC114">23.1.1 Dot</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">                         
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC115">23.1.2 Vectors</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">                     
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC116">23.1.3 eigen</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>

<p><a name="Item_003a-Dot"></a>
</p><hr size="6">
<a name="Dot"></a>
<a name="SEC114"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC113" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC115" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC112" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC113" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_24.html#SEC118" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_83.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 23.1.1 Dot </h3>

<p>The operator <code>.</code> represents noncommutative multiplication and scalar
product.  When the operands are 1-column or 1-row matrices <code>a</code> and
<code>b</code>, the expression <code>a.b</code> is equivalent to
<code>sum (a[i]*b[i], i, 1, length(a))</code>.  If <code>a</code> and <code>b</code> are not
complex, this is the scalar product, also called the inner product or dot
product, of <code>a</code> and <code>b</code>.  The scalar product is defined as
<code>conjugate(a).b</code> when <code>a</code> and <code>b</code> are complex;
<code><a href="#innerproduct">innerproduct</a></code>
 in the <code>eigen</code> package provides the complex scalar
product.
</p>
<p>When the operands are more general matrices,
the product is the matrix product <code>a</code> and <code>b</code>.
The number of rows of <code>b</code> must equal the number of columns of <code>a</code>,
and the result has number of rows equal to the number of rows of <code>a</code>
and number of columns equal to the number of columns of <code>b</code>.
</p>
<p>To distinguish <code>.</code> as an arithmetic operator from the decimal point in a
floating point number, it may be necessary to leave spaces on either side.
For example, <code>5.e3</code> is <code>5000.0</code> but <code>5 . e3</code> is <code>5</code>
times <code>e3</code>.
</p>
<p>There are several flags which govern the simplification of expressions
involving <code>.</code>, namely <code><a href="#dot0nscsimp">dot0nscsimp</a></code>,
 <code><a href="#dot0simp">dot0simp</a></code>,

<code><a href="#dot1simp">dot1simp</a></code>,
 <code><a href="#dotassoc">dotassoc</a></code>,
 <code><a href="#dotconstrules">dotconstrules</a></code>,

<code><a href="#dotdistrib">dotdistrib</a></code>,
 <code><a href="#dotexptsimp">dotexptsimp</a></code>,
 <code><a href="#dotident">dotident</a></code>,
 and
<code><a href="#dotscrules">dotscrules</a></code>.
</p>

<p><a name="Item_003a-Vectors"></a>
</p><hr size="6">
<a name="Vectors"></a>
<a name="SEC115"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC114" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC116" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC112" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC113" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_24.html#SEC118" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_83.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 23.1.2 Vectors </h3>

<p><code>vect</code> is a package of functions for vector analysis.  <code>load (&quot;vect&quot;)</code>
loads this package, and <code>demo (&quot;vect&quot;)</code> displays a demonstration.
</p>
<p>The vector analysis package can combine and simplify symbolic 
expressions including dot products and cross products, together with
the gradient, divergence, curl, and Laplacian operators.  The
distribution of these operators over sums or products is governed
by several flags, as are various other expansions, including expansion
into components in any specific orthogonal coordinate systems.
There are also functions for deriving the scalar or vector potential
of a field.
</p>
<p>The <code>vect</code> package contains these functions:
<code><a href="#vectorsimp">vectorsimp</a></code>,
 <code><a href="#scalefactors">scalefactors</a></code>,
 <code><a href="maxima_18.html#express">express</a></code>,

<code><a href="maxima_19.html#potential">potential</a></code>,
 and <code><a href="#vectorpotential">vectorpotential</a></code>.
</p>

<p>By default the <code>vect</code> package does not declare the dot operator to be a
commutative operator.  To get a commutative dot operator <code>.</code>, the command
<code>declare(&quot;.&quot;, commutative)</code> must be executed.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Vectors">Vectors</a>
 &middot;
<a href="maxima_99.html#Category_003a-Share-packages">Share packages</a>
 &middot;
<a href="maxima_99.html#Category_003a-Package-vect">Package vect</a>
</p>
</div>


<p><a name="Item_003a-eigen"></a>
</p><hr size="6">
<a name="eigen"></a>
<a name="SEC116"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC115" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC117" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC112" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC113" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_24.html#SEC118" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_83.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 23.1.3 eigen </h3>

<p>The package <code>eigen</code> contains several functions devoted to the
symbolic computation of eigenvalues and eigenvectors.
Maxima loads the package automatically if one of the functions
<code>eigenvalues</code> or <code>eigenvectors</code> is invoked.
The package may be loaded explicitly as <code>load (&quot;eigen&quot;)</code>.
</p>
<p><code>demo (&quot;eigen&quot;)</code> displays a demonstration of the capabilities
of this package.
<code>batch (&quot;eigen&quot;)</code> executes the same demonstration,
but without the user prompt between successive computations.
</p>
<p>The functions in the <code>eigen</code> package are:<br>
<code><a href="#innerproduct">innerproduct</a></code>,
 <code><a href="#unitvector">unitvector</a></code>,
 <code><a href="#columnvector">columnvector</a></code>,

<code><a href="#gramschmidt">gramschmidt</a></code>,
 <code><a href="#eigenvalues">eigenvalues</a></code>,
<br>
<code><a href="#eigenvectors">eigenvectors</a></code>,
 <code><a href="#uniteigenvectors">uniteigenvectors</a></code>,
 and
<code><a href="#similaritytransform">similaritytransform</a></code>.
</p>

<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Vectors">Vectors</a>
 &middot;
<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
 &middot;
<a href="maxima_99.html#Category_003a-Share-packages">Share packages</a>
 &middot;
<a href="maxima_99.html#Category_003a-Package-eigen">Package eigen</a>
</p>
</div>



<p><a name="Item_003a-Functions-and-Variables-for-Matrices-and-Linear-Algebra"></a>
</p><hr size="6">
<a name="Functions-and-Variables-for-Matrices-and-Linear-Algebra"></a>
<a name="SEC117"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC116" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima_24.html#SEC118" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC112" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC112" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_24.html#SEC118" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_83.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 23.2 Functions and Variables for Matrices and Linear Algebra </h2>

<p><a name="addcol"></a>
<a name="Item_003a-addcol"></a>
</p><dl>
<dt><u>Function:</u> <b>addcol</b><i> (<var>M</var>, <var>list_1</var>, &hellip;, <var>list_n</var>)</i>
<a name="IDX936"></a>
</dt>
<dd><p>Appends the column(s) given by the one
or more lists (or matrices) onto the matrix <var>M</var>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="addrow"></a>
<a name="Item_003a-addrow"></a>
</p><dl>
<dt><u>Function:</u> <b>addrow</b><i> (<var>M</var>, <var>list_1</var>, &hellip;, <var>list_n</var>)</i>
<a name="IDX937"></a>
</dt>
<dd><p>Appends the row(s) given by the one or
more lists (or matrices) onto the matrix <var>M</var>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="adjoint"></a>
<a name="Item_003a-adjoint"></a>
</p><dl>
<dt><u>Function:</u> <b>adjoint</b><i> (<var>M</var>)</i>
<a name="IDX938"></a>
</dt>
<dd><p>Returns the adjoint of the matrix <var>M</var>.
The adjoint matrix is the transpose of the matrix of cofactors of <var>M</var>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="augcoefmatrix"></a>
<a name="Item_003a-augcoefmatrix"></a>
</p><dl>
<dt><u>Function:</u> <b>augcoefmatrix</b><i> ([<var>eqn_1</var>, &hellip;, <var>eqn_m</var>], [<var>x_1</var>, &hellip;, <var>x_n</var>])</i>
<a name="IDX939"></a>
</dt>
<dd><p>Returns the augmented coefficient
matrix for the variables <var>x_1</var>, &hellip;, <var>x_n</var> of the system of linear
equations <var>eqn_1</var>, &hellip;, <var>eqn_m</var>.  This is the coefficient matrix
with a column adjoined for the constant terms in each equation (i.e., those
terms not dependent upon <var>x_1</var>, &hellip;, <var>x_n</var>).
</p>
<pre class="example">(%i1) m: [2*x - (a - 1)*y = 5*b, c + b*y + a*x = 0]$
(%i2) augcoefmatrix (m, [x, y]);
                       [ 2  1 - a  - 5 b ]
(%o2)                  [                 ]
                       [ a    b      c   ]
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Linear-equations">Linear equations</a>
 &middot;
<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="cauchy_005fmatrix"></a>
<a name="Item_003a-cauchy_005fmatrix"></a>
</p><dl>
<dt><u>Function:</u> <b>cauchy_matrix</b><i> ([<var>x_1</var>, <var>x_2</var>, &hellip;, <var>x_m</var>], [<var>y_1</var>, <var>y_2</var>, &hellip;, <var>y_n</var>])</i>
<a name="IDX940"></a>
</dt>
<dt><u>Function:</u> <b>cauchy_matrix</b><i> ([<var>x_1</var>, <var>x_2</var>, &hellip;, <var>x_n</var>])</i>
<a name="IDX941"></a>
</dt>
<dd><p>Returns a <code>n</code> by <var>m</var> Cauchy matrix with the elements <var>a[i,j]</var> 
= 1/(<var>x_i</var>+<var>y_i</var>).  The second argument of <code>cauchy_matrix</code> is 
optional.  For this case the elements of the Cauchy matrix are  
<var>a[i,j]</var> = 1/(<var>x_i</var>+<var>x_j</var>).
</p>
<p>Remark: In the literature the Cauchy matrix can be found defined in two forms.
A second definition is <var>a[i,j]</var> = 1/(<var>x_i</var>-<var>y_i</var>).
</p>
<p>Examples:
</p>
<pre class="example">(%i1) cauchy_matrix([x1,x2],[y1,y2]);
                      [    1        1    ]
                      [ -------  ------- ]
                      [ y1 + x1  y2 + x1 ]
(%o1)                 [                  ]
                      [    1        1    ]
                      [ -------  ------- ]
                      [ y1 + x2  y2 + x2 ]

(%i2) cauchy_matrix([x1,x2]);
                      [   1         1    ]
                      [  ----    ------- ]
                      [  2 x1    x2 + x1 ]
(%o2)                 [                  ]
                      [    1       1     ]
                      [ -------   ----   ]
                      [ x2 + x1   2 x2   ]
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="charpoly"></a>
<a name="Item_003a-charpoly"></a>
</p><dl>
<dt><u>Function:</u> <b>charpoly</b><i> (<var>M</var>, <var>x</var>)</i>
<a name="IDX942"></a>
</dt>
<dd><p>Returns the characteristic polynomial for the matrix <var>M</var>
with respect to variable <var>x</var>.  That is,
<code>determinant (<var>M</var> - diagmatrix (length (<var>M</var>), <var>x</var>))</code>.
</p>
<pre class="example">(%i1) a: matrix ([3, 1], [2, 4]);
                            [ 3  1 ]
(%o1)                       [      ]
                            [ 2  4 ]
(%i2) expand (charpoly (a, lambda));
                           2
(%o2)                lambda  - 7 lambda + 10
(%i3) (programmode: true, solve (%));
(%o3)               [lambda = 5, lambda = 2]
(%i4) matrix ([x1], [x2]);
                             [ x1 ]
(%o4)                        [    ]
                             [ x2 ]
(%i5) ev (a . % - lambda*%, %th(2)[1]);
                          [ x2 - 2 x1 ]
(%o5)                     [           ]
                          [ 2 x1 - x2 ]
(%i6) %[1, 1] = 0;
(%o6)                     x2 - 2 x1 = 0
(%i7) x2^2 + x1^2 = 1;
                            2     2
(%o7)                     x2  + x1  = 1
(%i8) solve ([%th(2), %], [x1, x2]);
                  1               2
(%o8) [[x1 = - -------, x2 = - -------], 
               sqrt(5)         sqrt(5)

                                             1             2
                                    [x1 = -------, x2 = -------]]
                                          sqrt(5)       sqrt(5)
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="coefmatrix"></a>
<a name="Item_003a-coefmatrix"></a>
</p><dl>
<dt><u>Function:</u> <b>coefmatrix</b><i> ([<var>eqn_1</var>, &hellip;, <var>eqn_m</var>], [<var>x_1</var>, &hellip;, <var>x_n</var>])</i>
<a name="IDX943"></a>
</dt>
<dd><p>Returns the coefficient matrix for the
variables <var>x_1</var>, &hellip;, <var>x_n</var> of the system of linear equations
<var>eqn_1</var>, &hellip;, <var>eqn_m</var>.
</p>
<pre class="example">(%i1) coefmatrix([2*x-(a-1)*y+5*b = 0, b*y+a*x = 3], [x,y]);
                                 [ 2  1 - a ]
(%o1)                            [          ]
                                 [ a    b   ]
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Linear-equations">Linear equations</a>
 &middot;
<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="col"></a>
<a name="Item_003a-col"></a>
</p><dl>
<dt><u>Function:</u> <b>col</b><i> (<var>M</var>, <var>i</var>)</i>
<a name="IDX944"></a>
</dt>
<dd><p>Returns the <var>i</var>'th column of the matrix <var>M</var>.
The return value is a matrix.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="columnvector"></a>
<a name="covect"></a>
<a name="Item_003a-columnvector"></a>
</p><dl>
<dt><u>Function:</u> <b>columnvector</b><i> (<var>L</var>)</i>
<a name="IDX945"></a>
</dt>
<dt><u>Function:</u> <b>covect</b><i> (<var>L</var>)</i>
<a name="IDX946"></a>
</dt>
<dd><p>Returns a matrix of one column and <code>length (<var>L</var>)</code> rows,
containing the elements of the list <var>L</var>.
</p>
<p><code>covect</code> is a synonym for <code>columnvector</code>.
</p>
<p><code>load (&quot;eigen&quot;)</code> loads this function.
</p>
<p>This is useful if you want to use parts of the outputs of
the functions in this package in matrix calculations.
</p>
<p>Example:
</p>
<pre class="example">(%i1) load (&quot;eigen&quot;)$
Warning - you are redefining the Macsyma function eigenvalues
Warning - you are redefining the Macsyma function eigenvectors
(%i2) columnvector ([aa, bb, cc, dd]);
                             [ aa ]
                             [    ]
                             [ bb ]
(%o2)                        [    ]
                             [ cc ]
                             [    ]
                             [ dd ]
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="copymatrix"></a>
<a name="Item_003a-copymatrix"></a>
</p><dl>
<dt><u>Function:</u> <b>copymatrix</b><i> (<var>M</var>)</i>
<a name="IDX947"></a>
</dt>
<dd><p>Returns a copy of the matrix <var>M</var>.  This is the only way
to make a copy aside from copying <var>M</var> element by element.
</p>
<p>Note that an assignment of one matrix to another, as in <code>m2: m1</code>, does not
copy <code>m1</code>.  An assignment <code>m2 [i,j]: x</code> or <code>setelmx(x, i, j, m2)</code>
also modifies <code>m1 [i,j]</code>.  Creating a copy with <code>copymatrix</code> and then
using assignment creates a separate, modified copy.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="determinant"></a>
<a name="Item_003a-determinant"></a>
</p><dl>
<dt><u>Function:</u> <b>determinant</b><i> (<var>M</var>)</i>
<a name="IDX948"></a>
</dt>
<dd><p>Computes the determinant of <var>M</var> by a method similar to
Gaussian elimination.
</p>
<p>The form of the result depends upon the setting of the switch <code><a href="#ratmx">ratmx</a></code>.
</p>

<p>There is a special routine for computing sparse determinants which is called
when the switches <code>ratmx</code> and <code><a href="#sparse">sparse</a></code>
 are both <code>true</code>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="detout"></a>
<a name="Item_003a-detout"></a>
</p><dl>
<dt><u>Option variable:</u> <b>detout</b>
<a name="IDX949"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>detout</code> is <code>true</code>, the determinant of a
matrix whose inverse is computed is factored out of the inverse.
</p>
<p>For this switch to have an effect <code><a href="#doallmxops">doallmxops</a></code>
 and <code><a href="#doscmxops">doscmxops</a></code>
 should
be <code>false</code> (see their descriptions).  Alternatively this switch can be
given to <code><a href="maxima_8.html#ev">ev</a></code>
 which causes the other two to be set correctly.
</p>
<p>Example:
</p>
<pre class="example">(%i1) m: matrix ([a, b], [c, d]);
                            [ a  b ]
(%o1)                       [      ]
                            [ c  d ]
(%i2) detout: true$
(%i3) doallmxops: false$
(%i4) doscmxops: false$
(%i5) invert (m);
                          [  d   - b ]
                          [          ]
                          [ - c   a  ]
(%o5)                     ------------
                           a d - b c
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
 &middot;
<a href="maxima_99.html#Category_003a-Evaluation-flags">Evaluation flags</a>
</p>
</div>

</dd></dl>

<p><a name="diagmatrix"></a>
<a name="Item_003a-diagmatrix"></a>
</p><dl>
<dt><u>Function:</u> <b>diagmatrix</b><i> (<var>n</var>, <var>x</var>)</i>
<a name="IDX950"></a>
</dt>
<dd><p>Returns a diagonal matrix of size <var>n</var> by <var>n</var> with the diagonal elements
all equal to <var>x</var>.  <code>diagmatrix (<var>n</var>, 1)</code> returns an identity matrix
(same as <code>ident (<var>n</var>)</code>).
</p>
<p><var>n</var> must evaluate to an integer, otherwise <code>diagmatrix</code> complains with
an error message.
</p>
<p><var>x</var> can be any kind of expression, including another matrix.  If <var>x</var> is
a matrix, it is not copied; all diagonal elements refer to the same instance,
<var>x</var>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="doallmxops"></a>
<a name="Item_003a-doallmxops"></a>
</p><dl>
<dt><u>Option variable:</u> <b>doallmxops</b>
<a name="IDX951"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>When <code>doallmxops</code> is <code>true</code>,
all operations relating to matrices are carried out.
When it is <code>false</code> then the setting of the
individual <code>dot</code> switches govern which operations are performed.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="domxexpt"></a>
<a name="Item_003a-domxexpt"></a>
</p><dl>
<dt><u>Option variable:</u> <b>domxexpt</b>
<a name="IDX952"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>When <code>domxexpt</code> is <code>true</code>,
a matrix exponential, <code>exp (<var>M</var>)</code> where <var>M</var> is a matrix, is
interpreted as a matrix with element <code>[i,j</code> equal to <code>exp (m[i,j])</code>.
Otherwise <code>exp (<var>M</var>)</code> evaluates to <code>exp (<var>ev(M)</var></code>.
</p>
<p><code>domxexpt</code> affects all expressions of the form
<code><var>base</var>^<var>power</var></code> where <var>base</var> is an expression assumed scalar
or constant, and <var>power</var> is a list or matrix.
</p>
<p>Example:
</p>
<pre class="example">(%i1) m: matrix ([1, %i], [a+b, %pi]);
                         [   1    %i  ]
(%o1)                    [            ]
                         [ b + a  %pi ]
(%i2) domxexpt: false$
(%i3) (1 - c)^m;
                             [   1    %i  ]
                             [            ]
                             [ b + a  %pi ]
(%o3)                 (1 - c)
(%i4) domxexpt: true$
(%i5) (1 - c)^m;
                  [                      %i  ]
                  [    1 - c      (1 - c)    ]
(%o5)             [                          ]
                  [        b + a         %pi ]
                  [ (1 - c)       (1 - c)    ]
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="domxmxops"></a>
<a name="Item_003a-domxmxops"></a>
</p><dl>
<dt><u>Option variable:</u> <b>domxmxops</b>
<a name="IDX953"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>When <code>domxmxops</code> is <code>true</code>, all matrix-matrix or
matrix-list operations are carried out (but not scalar-matrix
operations); if this switch is <code>false</code> such operations are not carried out.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="domxnctimes"></a>
<a name="Item_003a-domxnctimes"></a>
</p><dl>
<dt><u>Option variable:</u> <b>domxnctimes</b>
<a name="IDX954"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>domxnctimes</code> is <code>true</code>, non-commutative products of
matrices are carried out.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="dontfactor"></a>
<a name="Item_003a-dontfactor"></a>
</p><dl>
<dt><u>Option variable:</u> <b>dontfactor</b>
<a name="IDX955"></a>
</dt>
<dd><p>Default value: <code>[]</code>
</p>
<p><code>dontfactor</code> may be set to a list of variables with respect to which
factoring is not to occur.  (The list is initially empty.) Factoring also will
not take place with respect to any variables which are less important, according
the variable ordering assumed for canonical rational expression (CRE) form, than
those on the <code>dontfactor</code> list.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Expressions">Expressions</a>
</p>
</div>

</dd></dl>

<p><a name="doscmxops"></a>
<a name="Item_003a-doscmxops"></a>
</p><dl>
<dt><u>Option variable:</u> <b>doscmxops</b>
<a name="IDX956"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>doscmxops</code> is <code>true</code>, scalar-matrix operations are
carried out.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="doscmxplus"></a>
<a name="Item_003a-doscmxplus"></a>
</p><dl>
<dt><u>Option variable:</u> <b>doscmxplus</b>
<a name="IDX957"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>doscmxplus</code> is <code>true</code>, scalar-matrix operations yield
a matrix result.  This switch is not subsumed under <code><a href="#doallmxops">doallmxops</a></code>.
</p>

<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="dot0nscsimp"></a>
<a name="Item_003a-dot0nscsimp"></a>
</p><dl>
<dt><u>Option variable:</u> <b>dot0nscsimp</b>
<a name="IDX958"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>When <code>dot0nscsimp</code> is <code>true</code>, a non-commutative product of zero
and a nonscalar term is simplified to a commutative product.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Simplification-flags-and-variables">Simplification flags and variables</a>
</p>
</div>

</dd></dl>

<p><a name="dot0simp"></a>
<a name="Item_003a-dot0simp"></a>
</p><dl>
<dt><u>Option variable:</u> <b>dot0simp</b>
<a name="IDX959"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>When <code>dot0simp</code> is <code>true</code>,
a non-commutative product of zero and
a scalar term is simplified to a commutative product.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Simplification-flags-and-variables">Simplification flags and variables</a>
</p>
</div>

</dd></dl>

<p><a name="dot1simp"></a>
<a name="Item_003a-dot1simp"></a>
</p><dl>
<dt><u>Option variable:</u> <b>dot1simp</b>
<a name="IDX960"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>When <code>dot1simp</code> is <code>true</code>,
a non-commutative product of one and
another term is simplified to a commutative product.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Simplification-flags-and-variables">Simplification flags and variables</a>
</p>
</div>

</dd></dl>

<p><a name="dotassoc"></a>
<a name="Item_003a-dotassoc"></a>
</p><dl>
<dt><u>Option variable:</u> <b>dotassoc</b>
<a name="IDX961"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>When <code>dotassoc</code> is <code>true</code>, an expression <code>(A.B).C</code> simplifies to
<code>A.(B.C)</code>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Simplification-flags-and-variables">Simplification flags and variables</a>
</p>
</div>

</dd></dl>

<p><a name="dotconstrules"></a>
<a name="Item_003a-dotconstrules"></a>
</p><dl>
<dt><u>Option variable:</u> <b>dotconstrules</b>
<a name="IDX962"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>When <code>dotconstrules</code> is <code>true</code>, a non-commutative product of a
constant and another term is simplified to a commutative product.
Turning on this flag effectively turns on <code><a href="#dot0simp">dot0simp</a></code>,

<code><a href="#dot0nscsimp">dot0nscsimp</a></code>,
 and <code><a href="#dot1simp">dot1simp</a></code>
 as well.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Simplification-flags-and-variables">Simplification flags and variables</a>
</p>
</div>

</dd></dl>

<p><a name="dotdistrib"></a>
<a name="Item_003a-dotdistrib"></a>
</p><dl>
<dt><u>Option variable:</u> <b>dotdistrib</b>
<a name="IDX963"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>dotdistrib</code> is <code>true</code>, an expression <code>A.(B + C)</code> simplifies
to <code>A.B + A.C</code>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Simplification-flags-and-variables">Simplification flags and variables</a>
</p>
</div>

</dd></dl>

<p><a name="dotexptsimp"></a>
<a name="Item_003a-dotexptsimp"></a>
</p><dl>
<dt><u>Option variable:</u> <b>dotexptsimp</b>
<a name="IDX964"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>When <code>dotexptsimp</code> is <code>true</code>, an expression <code>A.A</code> simplifies to
<code>A^^2</code>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Simplification-flags-and-variables">Simplification flags and variables</a>
</p>
</div>

</dd></dl>

<p><a name="dotident"></a>
<a name="Item_003a-dotident"></a>
</p><dl>
<dt><u>Option variable:</u> <b>dotident</b>
<a name="IDX965"></a>
</dt>
<dd><p>Default value: 1
</p>
<p><code>dotident</code> is the value returned by <code>X^^0</code>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Simplification-flags-and-variables">Simplification flags and variables</a>
</p>
</div>

</dd></dl>

<p><a name="dotscrules"></a>
<a name="Item_003a-dotscrules"></a>
</p><dl>
<dt><u>Option variable:</u> <b>dotscrules</b>
<a name="IDX966"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>dotscrules</code> is <code>true</code>, an expression <code>A.SC</code> or <code>SC.A</code>
simplifies to <code>SC*A</code> and <code>A.(SC*B)</code> simplifies to <code>SC*(A.B)</code>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Simplification-flags-and-variables">Simplification flags and variables</a>
</p>
</div>

</dd></dl>

<p><a name="echelon"></a>
<a name="Item_003a-echelon"></a>
</p><dl>
<dt><u>Function:</u> <b>echelon</b><i> (<var>M</var>)</i>
<a name="IDX967"></a>
</dt>
<dd><p>Returns the echelon form of the matrix <var>M</var>,
as produced by Gaussian elimination.
The echelon form is computed from <var>M</var>
by elementary row operations such that the first
non-zero element in each row in the resulting matrix is one and the
column elements under the first one in each row are all zero.
</p>
<p><code><a href="#triangularize">triangularize</a></code>
 also carries out Gaussian elimination, but it does not
normalize the leading non-zero element in each row.
</p>
<p><code><a href="maxima_63.html#lu_005ffactor">lu_factor</a></code>
 and <code><a href="maxima_63.html#cholesky">cholesky</a></code>
 are other functions which yield
triangularized matrices.
</p>
<pre class="example">(%i1) M: matrix ([3, 7, aa, bb], [-1, 8, 5, 2], [9, 2, 11, 4]);
                       [  3   7  aa  bb ]
                       [                ]
(%o1)                  [ - 1  8  5   2  ]
                       [                ]
                       [  9   2  11  4  ]
(%i2) echelon (M);
                  [ 1  - 8  - 5      - 2     ]
                  [                          ]
                  [         28       11      ]
                  [ 0   1   --       --      ]
(%o2)             [         37       37      ]
                  [                          ]
                  [              37 bb - 119 ]
                  [ 0   0    1   ----------- ]
                  [              37 aa - 313 ]
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Linear-equations">Linear equations</a>
 &middot;
<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="eigenvalues"></a>
<a name="eivals"></a>
<a name="Item_003a-eigenvalues"></a>
</p><dl>
<dt><u>Function:</u> <b>eigenvalues</b><i> (<var>M</var>)</i>
<a name="IDX968"></a>
</dt>
<dt><u>Function:</u> <b>eivals</b><i> (<var>M</var>)</i>
<a name="IDX969"></a>
</dt>
<dd><p>Returns a list of two lists containing the eigenvalues of the matrix <var>M</var>.
The first sublist of the return value is the list of eigenvalues of the
matrix, and the second sublist is the list of the
multiplicities of the eigenvalues in the corresponding order.
</p>
<p><code>eivals</code> is a synonym for <code>eigenvalues</code>.
</p>
<p><code>eigenvalues</code> calls the function <code><a href="maxima_20.html#solve">solve</a></code>
 to find the roots of the
characteristic polynomial of the matrix.  Sometimes <code>solve</code> may not be able
to find the roots of the polynomial; in that case some other functions in this
package (except <code><a href="#innerproduct">innerproduct</a></code>,
 <code><a href="#unitvector">unitvector</a></code>,

<code><a href="#columnvector">columnvector</a></code>
 and <code><a href="#gramschmidt">gramschmidt</a></code>
) will not work.
</p>
<p>In some cases the eigenvalues found by <code>solve</code> may be complicated
expressions.  (This may happen when <code>solve</code> returns a not-so-obviously real
expression for an eigenvalue which is known to be real.)  It may be possible to
simplify the eigenvalues using some other functions.
</p>
<p>The package <code>eigen.mac</code> is loaded automatically when
<code>eigenvalues</code> or <code><a href="#eigenvectors">eigenvectors</a></code>
 is referenced.
If <code>eigen.mac</code> is not already loaded,
<code>load (&quot;eigen&quot;)</code> loads it.
After loading, all functions and variables in the package are available.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Package-eigen">Package eigen</a>
</p>
</div>

</dd></dl>

<p><a name="eigenvectors"></a>
<a name="eivects"></a>
<a name="Item_003a-eigenvectors"></a>
</p><dl>
<dt><u>Function:</u> <b>eigenvectors</b><i> (<var>M</var>)</i>
<a name="IDX970"></a>
</dt>
<dt><u>Function:</u> <b>eivects</b><i> (<var>M</var>)</i>
<a name="IDX971"></a>
</dt>
<dd><p>Computes eigenvectors of the matrix <var>M</var>.
The return value is a list of two elements.
The first is a list of the eigenvalues of <var>M</var>
and a list of the multiplicities of the eigenvalues.
The second is a list of lists of eigenvectors.
There is one list of eigenvectors for each eigenvalue.
There may be one or more eigenvectors in each list.
</p>
<p><code>eivects</code> is a synonym for <code>eigenvectors</code>.
</p>
<p>The package <code>eigen.mac</code> is loaded automatically when
<code><a href="#eigenvalues">eigenvalues</a></code>
 or <code>eigenvectors</code> is referenced.
If <code>eigen.mac</code> is not already loaded,
<code>load (&quot;eigen&quot;)</code> loads it.
After loading, all functions and variables in the package are available.
</p>
<p>The flags that affect this function are:
</p>
<p><code>nondiagonalizable</code> is set to <code>true</code> or <code>false</code> depending on
whether the matrix is nondiagonalizable or diagonalizable after
<code>eigenvectors</code> returns.
</p>
<p><code>hermitianmatrix</code> when <code>true</code>, causes the degenerate
eigenvectors of the Hermitian matrix to be orthogonalized using the
Gram-Schmidt algorithm.
</p>
<p><code>knowneigvals</code> when <code>true</code> causes the <code>eigen</code> package to assume
the eigenvalues of the matrix are known to the user and stored under the global
name <code>listeigvals</code>.  <code>listeigvals</code> should be set to a list similar
to the output <code>eigenvalues</code>.
</p>
<p>The function <code><a href="maxima_20.html#algsys">algsys</a></code>
 is used here to solve for the eigenvectors.
Sometimes if the eigenvalues are messy, <code>algsys</code> may not be able to find a
solution.  In some cases, it may be possible to simplify the eigenvalues by
first finding them using <code>eigenvalues</code> command and then using other
functions to reduce them to something simpler.  Following simplification,
<code>eigenvectors</code> can be called again with the <code>knowneigvals</code> flag set
to <code>true</code>.
</p>
<p>See also <code><a href="#eigenvalues">eigenvalues</a></code>.
</p>

<p>Examples:
</p>
<p>A matrix which has just one eigenvector per eigenvalue.
</p>
<pre class="example">(%i1) M1 : matrix ([11, -1], [1, 7]);
                           [ 11  - 1 ]
(%o1)                      [         ]
                           [ 1    7  ]
(%i2) [vals, vecs] : eigenvectors (M1);
(%o2) [[[9 - sqrt(3), sqrt(3) + 9], [1, 1]], 
                        [[[1, sqrt(3) + 2]], [[1, 2 - sqrt(3)]]]]
(%i3) for i thru length (vals[1]) do disp (val[i] = vals[1][i],
  mult[i] = vals[2][i], vec[i] = vecs[i]);
                       val  = 9 - sqrt(3)
                          1

                            mult  = 1
                                1

                    vec  = [[1, sqrt(3) + 2]]
                       1

                       val  = sqrt(3) + 9
                          2

                            mult  = 1
                                2

                    vec  = [[1, 2 - sqrt(3)]]
                       2

(%o3)                         done
</pre>
<p>A matrix which has two eigenvectors for one eigenvalue (namely 2).
</p>
<pre class="example">(%i1) M1 : matrix ([0, 1, 0, 0], [0, 0, 0, 0], [0, 0, 2, 0], 
                   [0, 0, 0, 2]);
                         [ 0  1  0  0 ]
                         [            ]
                         [ 0  0  0  0 ]
(%o1)                    [            ]
                         [ 0  0  2  0 ]
                         [            ]
                         [ 0  0  0  2 ]
(%i2) [vals, vecs] : eigenvectors (M1);
(%o2) [[[0, 2], [2, 2]], [[[1, 0, 0, 0]],
                                   [[0, 0, 1, 0], [0, 0, 0, 1]]]]
(%i3) for i thru length (vals[1]) do disp (val[i] = vals[1][i],
  mult[i] = vals[2][i], vec[i] = vecs[i]);
                            val  = 0
                               1

                            mult  = 2
                                1

                      vec  = [[1, 0, 0, 0]]
                         1

                            val  = 2
                               2

                            mult  = 2
                                2

               vec  = [[0, 0, 1, 0], [0, 0, 0, 1]]
                  2

(%o3)                         done
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Package-eigen">Package eigen</a>
</p>
</div>

</dd></dl>

<p><a name="ematrix"></a>
<a name="Item_003a-ematrix"></a>
</p><dl>
<dt><u>Function:</u> <b>ematrix</b><i> (<var>m</var>, <var>n</var>, <var>x</var>, <var>i</var>, <var>j</var>)</i>
<a name="IDX972"></a>
</dt>
<dd><p>Returns an <var>m</var> by <var>n</var> matrix, all elements of which
are zero except for the <code>[<var>i</var>, <var>j</var>]</code> element which is <var>x</var>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="entermatrix"></a>
<a name="Item_003a-entermatrix"></a>
</p><dl>
<dt><u>Function:</u> <b>entermatrix</b><i> (<var>m</var>, <var>n</var>)</i>
<a name="IDX973"></a>
</dt>
<dd><p>Returns an <var>m</var> by <var>n</var> matrix, reading the elements interactively.
</p>
<p>If <var>n</var> is equal to <var>m</var>, Maxima prompts for the type of the matrix
(diagonal, symmetric, antisymmetric, or general) and for each element.
Each response is terminated by a semicolon <code>;</code> or dollar sign <code>$</code>.
</p>
<p>If <var>n</var> is not equal to <var>m</var>,
Maxima prompts for each element.
</p>
<p>The elements may be any expressions, which are evaluated.
<code>entermatrix</code> evaluates its arguments.
</p>
<pre class="example">(%i1) n: 3$
(%i2) m: entermatrix (n, n)$

Is the matrix  1. Diagonal  2. Symmetric  3. Antisymmetric 
4. General
Answer 1, 2, 3 or 4 : 
1$
Row 1 Column 1: 
(a+b)^n$
Row 2 Column 2: 
(a+b)^(n+1)$
Row 3 Column 3: 
(a+b)^(n+2)$

Matrix entered.
(%i3) m;
                [        3                     ]
                [ (b + a)      0         0     ]
                [                              ]
(%o3)           [                  4           ]
                [    0      (b + a)      0     ]
                [                              ]
                [                            5 ]
                [    0         0      (b + a)  ]
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Console-interaction">Console interaction</a>
 &middot;
<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="genmatrix"></a>
<a name="Item_003a-genmatrix"></a>
</p><dl>
<dt><u>Function:</u> <b>genmatrix</b><i> (<var>a</var>, <var>i_2</var>, <var>j_2</var>, <var>i_1</var>, <var>j_1</var>)</i>
<a name="IDX974"></a>
</dt>
<dt><u>Function:</u> <b>genmatrix</b><i> (<var>a</var>, <var>i_2</var>, <var>j_2</var>, <var>i_1</var>)</i>
<a name="IDX975"></a>
</dt>
<dt><u>Function:</u> <b>genmatrix</b><i> (<var>a</var>, <var>i_2</var>, <var>j_2</var>)</i>
<a name="IDX976"></a>
</dt>
<dd><p>Returns a matrix generated from <var>a</var>, taking element
<code><var>a</var>[<var>i_1</var>, <var>j_1</var>]</code> as the upper-left element and
<code><var>a</var>[<var>i_2</var>, <var>j_2</var>]</code> as the lower-right element of the matrix.
Here <var>a</var> is a declared array (created by <code>array</code> but not by
<code><a href="maxima_5.html#make_005farray">make_array</a></code>
) or an undeclared array, or an array function, or a lambda
expression of two arguments.  (An array function is created like other functions
with <code><a href="maxima_7.html#g_t_003a_003d">:=</a></code>
 or <code><a href="maxima_36.html#define">define</a></code>,
 but arguments are enclosed in square
brackets instead of parentheses.)
</p>
<p>If <var>j_1</var> is omitted, it is assumed equal to <var>i_1</var>.
If both <var>j_1</var> and <var>i_1</var> are omitted, both are assumed equal to 1.
</p>
<p>If a selected element <code>i,j</code> of the array is undefined,
the matrix will contain a symbolic element <code><var>a</var>[i,j]</code>.
</p>
<p>Examples:
</p>
<pre class="example">(%i1) h [i, j] := 1 / (i + j - 1);
                                    1
(%o1)                  h     := ---------
                        i, j    i + j - 1
(%i2) genmatrix (h, 3, 3);
                           [    1  1 ]
                           [ 1  -  - ]
                           [    2  3 ]
                           [         ]
                           [ 1  1  1 ]
(%o2)                      [ -  -  - ]
                           [ 2  3  4 ]
                           [         ]
                           [ 1  1  1 ]
                           [ -  -  - ]
                           [ 3  4  5 ]
(%i3) array (a, fixnum, 2, 2);
(%o3)                           a
(%i4) a [1, 1] : %e;
(%o4)                          %e
(%i5) a [2, 2] : %pi;
(%o5)                          %pi
(%i6) genmatrix (a, 2, 2);
                           [ %e   0  ]
(%o6)                      [         ]
                           [ 0   %pi ]
(%i7) genmatrix (lambda ([i, j], j - i), 3, 3);
                         [  0    1   2 ]
                         [             ]
(%o7)                    [ - 1   0   1 ]
                         [             ]
                         [ - 2  - 1  0 ]
(%i8) genmatrix (B, 2, 2);
                        [ B      B     ]
                        [  1, 1   1, 2 ]
(%o8)                   [              ]
                        [ B      B     ]
                        [  2, 1   2, 2 ]
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="gramschmidt"></a>
<a name="Item_003a-gramschmidt"></a>
</p><dl>
<dt><u>Function:</u> <b>gramschmidt</b><i> (<var>x</var>)</i>
<a name="IDX977"></a>
</dt>
<dt><u>Function:</u> <b>gramschmidt</b><i> (<var>x</var>, <var>F</var>)</i>
<a name="IDX978"></a>
</dt>
<dd><p>Carries out the Gram-Schmidt orthogonalization algorithm on <var>x</var>, which is
either a matrix or a list of lists.  <var>x</var> is not modified by
<code>gramschmidt</code>.  The inner product employed by <code>gramschmidt</code> is
<var>F</var>, if present, otherwise the inner product is the function
<code><a href="#innerproduct">innerproduct</a></code>.
</p>

<p>If <var>x</var> is a matrix, the algorithm is applied to the rows of <var>x</var>.  If
<var>x</var> is a list of lists, the algorithm is applied to the sublists, which must
have equal numbers of elements.  In either case, the return value is a list of
lists, the sublists of which are orthogonal and span the same space as <var>x</var>.
If the dimension of the span of <var>x</var> is less than the number of rows or
sublists, some sublists of the return value are zero.
</p>
<p><code><a href="maxima_14.html#factor">factor</a></code>
 is called at each stage of the algorithm to simplify intermediate
results.  As a consequence, the return value may contain factored integers.
</p>
<p><code>load(eigen)</code> loads this function.
</p>
<p>Example:
</p>
<p>Gram-Schmidt algorithm using default inner product function.
</p>
<pre class="example">(%i1) load (eigen)$
(%i2) x: matrix ([1, 2, 3], [9, 18, 30], [12, 48, 60]);
                         [ 1   2   3  ]
                         [            ]
(%o2)                    [ 9   18  30 ]
                         [            ]
                         [ 12  48  60 ]
(%i3) y: gramschmidt (x);
                       2      2            4     3
                      3      3   3 5      2  3  2  3
(%o3)  [[1, 2, 3], [- ---, - --, ---], [- ----, ----, 0]]
                      2 7    7   2 7       5     5
(%i4) map (innerproduct, [y[1], y[2], y[3]], [y[2], y[3], y[1]]);
(%o4)                       [0, 0, 0]
</pre>
<p>Gram-Schmidt algorithm using a specified inner product function.
</p>
<pre class="example">(%i1) load (eigen)$
(%i2) ip (f, g) := integrate (f * g, u, a, b);
(%o2)          ip(f, g) := integrate(f g, u, a, b)
(%i3) y : gramschmidt([1, sin(u), cos(u)], ip), a= -%pi/2, b=%pi/2;
                               %pi cos(u) - 2
(%o3)              [1, sin(u), --------------]
                                    %pi
(%i4) map (ip, [y[1], y[2], y[3]], [y[2], y[3], y[1]]), 
                                                a= -%pi/2, b=%pi/2;
(%o4)                       [0, 0, 0]
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Package-eigen">Package eigen</a>
</p>
</div>

</dd></dl>

<p><a name="ident"></a>
<a name="Item_003a-ident"></a>
</p><dl>
<dt><u>Function:</u> <b>ident</b><i> (<var>n</var>)</i>
<a name="IDX979"></a>
</dt>
<dd><p>Returns an <var>n</var> by <var>n</var> identity matrix.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="innerproduct"></a>
<a name="inprod"></a>
<a name="Item_003a-innerproduct"></a>
</p><dl>
<dt><u>Function:</u> <b>innerproduct</b><i> (<var>x</var>, <var>y</var>)</i>
<a name="IDX980"></a>
</dt>
<dt><u>Function:</u> <b>inprod</b><i> (<var>x</var>, <var>y</var>)</i>
<a name="IDX981"></a>
</dt>
<dd><p>Returns the inner product (also called the scalar product or dot product) of
<var>x</var> and <var>y</var>, which are lists of equal length, or both 1-column or 1-row
matrices of equal length.  The return value is <code>conjugate (x) . y</code>,
where <code>.</code> is the noncommutative multiplication operator.
</p>
<p><code>load (&quot;eigen&quot;)</code> loads this function.
</p>
<p><code>inprod</code> is a synonym for <code>innerproduct</code>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Package-eigen">Package eigen</a>
</p>
</div>

</dd></dl>


<p><a name="invert"></a>
<a name="Item_003a-invert"></a>
</p><dl>
<dt><u>Function:</u> <b>invert</b><i> (<var>M</var>)</i>
<a name="IDX982"></a>
</dt>
<dd><p>Returns the inverse of the matrix <var>M</var>.
The inverse is computed by the adjoint method.
</p>
<p>This allows a user to compute the inverse of a matrix with
bfloat entries or polynomials with floating point coefficients without
converting to cre-form.
</p>
<p>Cofactors are computed by the <code><a href="#determinant">determinant</a></code>
 function, so if <code><a href="#ratmx">ratmx</a></code>
 is
<code>false</code> the inverse is computed without changing the representation of the
elements.
</p>
<p>The current implementation is inefficient for matrices of high order.
</p>
<p>When <code><a href="#detout">detout</a></code>
 is <code>true</code>, the determinant is factored out of the
inverse.
</p>
<p>The elements of the inverse are not automatically expanded.
If <var>M</var> has polynomial elements, better appearing output can be
generated by <code>expand (invert (m)), detout</code>.
If it is desirable to then
divide through by the determinant this can be accomplished by <code>xthru (%)</code>
or alternatively from scratch by
</p>
<pre class="example">expand (adjoint (m)) / expand (determinant (m))
invert (m) := adjoint (m) / determinant (m)
</pre>
<p>See <code>^^</code> (noncommutative exponent) for another method of inverting a
matrix.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="list_005fmatrix_005fentries"></a>
<a name="Item_003a-list_005fmatrix_005fentries"></a>
</p><dl>
<dt><u>Function:</u> <b>list_matrix_entries</b><i> (<var>M</var>)</i>
<a name="IDX983"></a>
</dt>
<dd><p>Returns a list containing the elements of the matrix <var>M</var>.
</p>
<p>Example:
</p>
<pre class="example">(%i1) list_matrix_entries(matrix([a,b],[c,d]));
(%o1)                     [a, b, c, d]
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="lmxchar"></a>
<a name="Item_003a-lmxchar"></a>
</p><dl>
<dt><u>Option variable:</u> <b>lmxchar</b>
<a name="IDX984"></a>
</dt>
<dd><p>Default value: <code>[</code>
</p>
<p><code>lmxchar</code> is the character displayed as the left delimiter of a matrix.
See also <code><a href="#rmxchar">rmxchar</a></code>
.
</p>
<p>Example:
</p>
<pre class="example">(%i1) lmxchar: &quot;|&quot;$
(%i2) matrix ([a, b, c], [d, e, f], [g, h, i]);
                           | a  b  c ]
                           |         ]
(%o2)                      | d  e  f ]
                           |         ]
                           | g  h  i ]
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Display-flags-and-variables">Display flags and variables</a>
 &middot;
<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="matrix"></a>
<a name="Item_003a-matrix"></a>
</p><dl>
<dt><u>Function:</u> <b>matrix</b><i> (<var>row_1</var>, &hellip;, <var>row_n</var>)</i>
<a name="IDX985"></a>
</dt>
<dd><p>Returns a rectangular matrix which has the rows <var>row_1</var>, &hellip;,
<var>row_n</var>.  Each row is a list of expressions.  All rows must be the same
length.
</p>
<p>The operations <code>+</code> (addition), <code>-</code> (subtraction), <code>*</code>
(multiplication), and <code>/</code> (division), are carried out element by element
when the operands are two matrices, a scalar and a matrix, or a matrix and a
scalar.  The operation <code>^</code> (exponentiation, equivalently <code>**</code>)
is carried out element by element if the operands are a scalar and a matrix or
a matrix and a scalar, but not if the operands are two matrices.
All operations are normally carried out in full,
including <code>.</code> (noncommutative multiplication).
</p>
<p>Matrix multiplication is represented by the noncommutative multiplication
operator <code>.</code>.  The corresponding noncommutative exponentiation operator
is <code>^^</code>.  For a matrix <code><var>A</var></code>, <code><var>A</var>.<var>A</var> = <var>A</var>^^2</code>
and <code><var>A</var>^^-1</code> is the inverse of <var>A</var>, if it exists.
</p>
<p>There are switches for controlling simplification of expressions involving dot
and matrix-list operations.  These are
<code><a href="#doallmxops">doallmxops</a></code>,
 <code><a href="#domxexpt">domxexpt</a></code>,
 <code><a href="#domxmxops">domxmxops</a></code>,

<code><a href="#doscmxops">doscmxops</a></code>,
 and <code><a href="#doscmxplus">doscmxplus</a></code>.
</p>

<p>There are additional options which are related to matrices.  These are:
<code><a href="#lmxchar">lmxchar</a></code>,
 <code><a href="#rmxchar">rmxchar</a></code>,
 <code><a href="#ratmx">ratmx</a></code>,

<code><a href="maxima_5.html#listarith">listarith</a></code>,
 <code><a href="#detout">detout</a></code>,
 <code>scalarmatrix</code> and
<code><a href="#sparse">sparse</a></code>.
</p>

<p>There are a number of functions which take matrices as arguments or yield
matrices as return values.
See <code><a href="#eigenvalues">eigenvalues</a></code>,
 <code><a href="#eigenvectors">eigenvectors</a></code>,
 <code><a href="#determinant">determinant</a></code>,

<code><a href="#charpoly">charpoly</a></code>,
 <code><a href="#genmatrix">genmatrix</a></code>,
 <code><a href="#addcol">addcol</a></code>,

<code><a href="#addrow">addrow</a></code>,
 <code><a href="#copymatrix">copymatrix</a></code>,
 <code><a href="#transpose">transpose</a></code>,

<code><a href="#echelon">echelon</a></code>,
 and <code><a href="#rank">rank</a></code>.
</p>

<p>Examples:
</p>
<ul>
<li>
Construction of matrices from lists.
</li></ul>
<pre class="example">(%i1) x: matrix ([17, 3], [-8, 11]);
                           [ 17   3  ]
(%o1)                      [         ]
                           [ - 8  11 ]
(%i2) y: matrix ([%pi, %e], [a, b]);
                           [ %pi  %e ]
(%o2)                      [         ]
                           [  a   b  ]
</pre><ul>
<li>
Addition, element by element.
</li></ul>
<pre class="example">(%i3) x + y;
                      [ %pi + 17  %e + 3 ]
(%o3)                 [                  ]
                      [  a - 8    b + 11 ]
</pre><ul>
<li>
Subtraction, element by element.
</li></ul>
<pre class="example">(%i4) x - y;
                      [ 17 - %pi  3 - %e ]
(%o4)                 [                  ]
                      [ - a - 8   11 - b ]
</pre><ul>
<li>
Multiplication, element by element.
</li></ul>
<pre class="example">(%i5) x * y;
                        [ 17 %pi  3 %e ]
(%o5)                   [              ]
                        [ - 8 a   11 b ]
</pre><ul>
<li>
Division, element by element.
</li></ul>
<pre class="example">(%i6) x / y;
                        [ 17       - 1 ]
                        [ ---  3 %e    ]
                        [ %pi          ]
(%o6)                   [              ]
                        [   8    11    ]
                        [ - -    --    ]
                        [   a    b     ]
</pre><ul>
<li>
Matrix to a scalar exponent, element by element.
</li></ul>
<pre class="example">(%i7) x ^ 3;
                         [ 4913    27  ]
(%o7)                    [             ]
                         [ - 512  1331 ]
</pre><ul>
<li>
Scalar base to a matrix exponent, element by element.
</li></ul>
<pre class="example">(%i8) exp(y); 
                         [   %pi    %e ]
                         [ %e     %e   ]
(%o8)                    [             ]
                         [    a     b  ]
                         [  %e    %e   ]
</pre><ul>
<li>
Matrix base to a matrix exponent.  This is not carried out element by element.
</li></ul>
<pre class="example">(%i9) x ^ y;
                                [ %pi  %e ]
                                [         ]
                                [  a   b  ]
                     [ 17   3  ]
(%o9)                [         ]
                     [ - 8  11 ]
</pre><ul>
<li>
Noncommutative matrix multiplication.
</li></ul>
<pre class="example">(%i10) x . y;
                  [ 3 a + 17 %pi  3 b + 17 %e ]
(%o10)            [                           ]
                  [ 11 a - 8 %pi  11 b - 8 %e ]
(%i11) y . x;
                [ 17 %pi - 8 %e  3 %pi + 11 %e ]
(%o11)          [                              ]
                [  17 a - 8 b     11 b + 3 a   ]
</pre><ul>
<li>
Noncommutative matrix exponentiation.
A scalar base <var>b</var> to a matrix power <var>M</var>
is carried out element by element and so <code>b^^m</code> is the same as <code>b^m</code>.
</li></ul>
<pre class="example">(%i12) x ^^ 3;
                        [  3833   1719 ]
(%o12)                  [              ]
                        [ - 4584  395  ]
(%i13) %e ^^ y;
                         [   %pi    %e ]
                         [ %e     %e   ]
(%o13)                   [             ]
                         [    a     b  ]
                         [  %e    %e   ]
</pre><ul>
<li>
A matrix raised to a -1 exponent with noncommutative exponentiation is the
matrix inverse, if it exists.
</li></ul>
<pre class="example">(%i14) x ^^ -1;
                         [ 11      3  ]
                         [ ---  - --- ]
                         [ 211    211 ]
(%o14)                   [            ]
                         [  8    17   ]
                         [ ---   ---  ]
                         [ 211   211  ]
(%i15) x . (x ^^ -1);
                            [ 1  0 ]
(%o15)                      [      ]
                            [ 0  1 ]
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="matrixmap"></a>
<a name="Item_003a-matrixmap"></a>
</p><dl>
<dt><u>Function:</u> <b>matrixmap</b><i> (<var>f</var>, <var>M</var>)</i>
<a name="IDX986"></a>
</dt>
<dd><p>Returns a matrix with element <code>i,j</code> equal to <code><var>f</var>(<var>M</var>[i,j])</code>.
</p>
<p>See also <code><a href="maxima_37.html#map">map</a></code>,
 <code><a href="maxima_36.html#fullmap">fullmap</a></code>,
 <code><a href="maxima_36.html#fullmapl">fullmapl</a></code>,
 and
<code><a href="maxima_36.html#apply">apply</a></code>.
</p>

<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="matrixp"></a>
<a name="Item_003a-matrixp"></a>
</p><dl>
<dt><u>Function:</u> <b>matrixp</b><i> (<var>expr</var>)</i>
<a name="IDX987"></a>
</dt>
<dd><p>Returns <code>true</code> if <var>expr</var> is a matrix, otherwise <code>false</code>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Predicate-functions">Predicate functions</a>
 &middot;
<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="matrix_005felement_005fadd"></a>
<a name="Item_003a-matrix_005felement_005fadd"></a>
</p><dl>
<dt><u>Option variable:</u> <b>matrix_element_add</b>
<a name="IDX988"></a>
</dt>
<dd><p>Default value: <code>+</code>
</p>
<p><code>matrix_element_add</code> is the operation 
invoked in place of addition in a matrix multiplication.
<code>matrix_element_add</code> can be assigned any n-ary operator
(that is, a function which handles any number of arguments).
The assigned value may be the name of an operator enclosed in quote marks,
the name of a function,
or a lambda expression.
</p>
<p>See also <code><a href="#matrix_005felement_005fmult">matrix_element_mult</a></code>
 and <code><a href="#matrix_005felement_005ftranspose">matrix_element_transpose</a></code>.
</p>

<p>Example:
</p>
<pre class="example">(%i1) matrix_element_add: &quot;*&quot;$
(%i2) matrix_element_mult: &quot;^&quot;$
(%i3) aa: matrix ([a, b, c], [d, e, f]);
                           [ a  b  c ]
(%o3)                      [         ]
                           [ d  e  f ]
(%i4) bb: matrix ([u, v, w], [x, y, z]);
                           [ u  v  w ]
(%o4)                      [         ]
                           [ x  y  z ]
(%i5) aa . transpose (bb);
                     [  u  v  w   x  y  z ]
                     [ a  b  c   a  b  c  ]
(%o5)                [                    ]
                     [  u  v  w   x  y  z ]
                     [ d  e  f   d  e  f  ]
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="matrix_005felement_005fmult"></a>
<a name="Item_003a-matrix_005felement_005fmult"></a>
</p><dl>
<dt><u>Option variable:</u> <b>matrix_element_mult</b>
<a name="IDX989"></a>
</dt>
<dd><p>Default value: <code>*</code>
</p>
<p><code>matrix_element_mult</code> is the operation 
invoked in place of multiplication in a matrix multiplication.
<code>matrix_element_mult</code> can be assigned any binary operator.
The assigned value may be the name of an operator enclosed in quote marks,
the name of a function,
or a lambda expression.
</p>
<p>The dot operator <code>.</code> is a useful choice in some contexts.
</p>
<p>See also <code><a href="#matrix_005felement_005fadd">matrix_element_add</a></code>
 and <code><a href="#matrix_005felement_005ftranspose">matrix_element_transpose</a></code>.
</p>

<p>Example:
</p>
<pre class="example">(%i1) matrix_element_add: lambda ([[x]], sqrt (apply (&quot;+&quot;, x)))$
(%i2) matrix_element_mult: lambda ([x, y], (x - y)^2)$
(%i3) [a, b, c] . [x, y, z];
                          2          2          2
(%o3)         sqrt((c - z)  + (b - y)  + (a - x) )
(%i4) aa: matrix ([a, b, c], [d, e, f]);
                           [ a  b  c ]
(%o4)                      [         ]
                           [ d  e  f ]
(%i5) bb: matrix ([u, v, w], [x, y, z]);
                           [ u  v  w ]
(%o5)                      [         ]
                           [ x  y  z ]
(%i6) aa . transpose (bb);
               [             2          2          2  ]
               [ sqrt((c - w)  + (b - v)  + (a - u) ) ]
(%o6)  Col 1 = [                                      ]
               [             2          2          2  ]
               [ sqrt((f - w)  + (e - v)  + (d - u) ) ]

                         [             2          2          2  ]
                         [ sqrt((c - z)  + (b - y)  + (a - x) ) ]
                 Col 2 = [                                      ]
                         [             2          2          2  ]
                         [ sqrt((f - z)  + (e - y)  + (d - x) ) ]
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="matrix_005felement_005ftranspose"></a>
<a name="Item_003a-matrix_005felement_005ftranspose"></a>
</p><dl>
<dt><u>Option variable:</u> <b>matrix_element_transpose</b>
<a name="IDX990"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p><code>matrix_element_transpose</code> is the operation 
applied to each element of a matrix when it is transposed.
<code><a href="#matrix_005felement_005fmult">matrix_element_mult</a></code>
 can be assigned any unary operator.
The assigned value may be the name of an operator enclosed in quote marks,
the name of a function, or a lambda expression.
</p>
<p>When <code>matrix_element_transpose</code> equals <code><a href="#transpose">transpose</a></code>,
</p>
<p>the <code>transpose</code> function is applied to every element.
When <code>matrix_element_transpose</code> equals <code>nonscalars</code>,
the <code>transpose</code> function is applied to every nonscalar element.
If some element is an atom, the <code>nonscalars</code> option applies
<code>transpose</code> only if the atom is declared nonscalar,
while the <code>transpose</code> option always applies <code>transpose</code>.
</p>
<p>The default value, <code>false</code>, means no operation is applied.
</p>
<p>See also <code><a href="#matrix_005felement_005fadd">matrix_element_add</a></code>
 and <code><a href="#matrix_005felement_005fmult">matrix_element_mult</a></code>.
</p>

<p>Examples:
</p>
<pre class="example">(%i1) declare (a, nonscalar)$
(%i2) transpose ([a, b]);
                        [ transpose(a) ]
(%o2)                   [              ]
                        [      b       ]
(%i3) matrix_element_transpose: nonscalars$
(%i4) transpose ([a, b]);
                        [ transpose(a) ]
(%o4)                   [              ]
                        [      b       ]
(%i5) matrix_element_transpose: transpose$
(%i6) transpose ([a, b]);
                        [ transpose(a) ]
(%o6)                   [              ]
                        [ transpose(b) ]
(%i7) matrix_element_transpose: lambda ([x], realpart(x)
      - %i*imagpart(x))$
(%i8) m: matrix ([1 + 5*%i, 3 - 2*%i], [7*%i, 11]);
                     [ 5 %i + 1  3 - 2 %i ]
(%o8)                [                    ]
                     [   7 %i       11    ]
(%i9) transpose (m);
                      [ 1 - 5 %i  - 7 %i ]
(%o9)                 [                  ]
                      [ 2 %i + 3    11   ]
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>


<p><a name="mattrace"></a>
<a name="Item_003a-mattrace"></a>
</p><dl>
<dt><u>Function:</u> <b>mattrace</b><i> (<var>M</var>)</i>
<a name="IDX991"></a>
</dt>
<dd><p>Returns the trace (that is, the sum of the elements on the main diagonal) of
the square matrix <var>M</var>.
</p>
<p><code>mattrace</code> is called by <code><a href="#ncharpoly">ncharpoly</a></code>,
 an alternative to Maxima's
<code><a href="#charpoly">charpoly</a></code>.
</p>

<p><code>load (&quot;nchrpl&quot;)</code> loads this function.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
 &middot;
<a href="maxima_99.html#Category_003a-Package-nchrpl">Package nchrpl</a>
</p>
</div>

</dd></dl>

<p><a name="minor"></a>
<a name="Item_003a-minor"></a>
</p><dl>
<dt><u>Function:</u> <b>minor</b><i> (<var>M</var>, <var>i</var>, <var>j</var>)</i>
<a name="IDX992"></a>
</dt>
<dd><p>Returns the <var>i</var>, <var>j</var> minor of the matrix <var>M</var>.  That is, <var>M</var>
with row <var>i</var> and column <var>j</var> removed.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="ncharpoly"></a>
<a name="Item_003a-ncharpoly"></a>
</p><dl>
<dt><u>Function:</u> <b>ncharpoly</b><i> (<var>M</var>, <var>x</var>)</i>
<a name="IDX993"></a>
</dt>
<dd><p>Returns the characteristic polynomial of the matrix <var>M</var>
with respect to <var>x</var>.  This is an alternative to Maxima's <code><a href="#charpoly">charpoly</a></code>.
</p>

<p><code>ncharpoly</code> works by computing traces of powers of the given matrix,
which are known to be equal to sums of powers of the roots of the
characteristic polynomial.  From these quantities the symmetric
functions of the roots can be calculated, which are nothing more than
the coefficients of the characteristic polynomial.  <code>charpoly</code> works by
forming the determinant of <code><var>x</var> * ident [n] - a</code>.  Thus
<code>ncharpoly</code> wins, for example, in the case of large dense matrices filled
with integers, since it avoids polynomial arithmetic altogether.
</p>
<p><code>load (&quot;nchrpl&quot;)</code> loads this file.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
 &middot;
<a href="maxima_99.html#Category_003a-Package-nchrpl">Package nchrpl</a>
</p>
</div>

</dd></dl>

<p><a name="newdet"></a>
<a name="Item_003a-newdet"></a>
</p><dl>
<dt><u>Function:</u> <b>newdet</b><i> (<var>M</var>)</i>
<a name="IDX994"></a>
</dt>
<dd><p>Computes the determinant of the matrix <var>M</var> by the Johnson-Gentleman tree 
minor algorithm.  <code>newdet</code> returns the result in CRE form.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="permanent"></a>
<a name="Item_003a-permanent"></a>
</p><dl>
<dt><u>Function:</u> <b>permanent</b><i> (<var>M</var>)</i>
<a name="IDX995"></a>
</dt>
<dd><p>Computes the permanent of the matrix <var>M</var> by the Johnson-Gentleman tree
minor algorithm.  A permanent is like a determinant but with no sign changes.
<code>permanent</code> returns the result in CRE form.
</p>
<p>See also <code>newdet</code>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="rank"></a>
<a name="Item_003a-rank"></a>
</p><dl>
<dt><u>Function:</u> <b>rank</b><i> (<var>M</var>)</i>
<a name="IDX996"></a>
</dt>
<dd><p>Computes the rank of the matrix <var>M</var>.  That is, the order of the
largest non-singular subdeterminant of <var>M</var>.
</p>
<p><var>rank</var> may return the
wrong answer if it cannot determine that a matrix element that is
equivalent to zero is indeed so.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="ratmx"></a>
<a name="Item_003a-ratmx"></a>
</p><dl>
<dt><u>Option variable:</u> <b>ratmx</b>
<a name="IDX997"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>ratmx</code> is <code>false</code>, determinant and matrix
addition, subtraction, and multiplication are performed in the
representation of the matrix elements and cause the result of
matrix inversion to be left in general representation.
</p>
<p>When <code>ratmx</code> is <code>true</code>,
the 4 operations mentioned above are performed in CRE form and the
result of matrix inverse is in CRE form.  Note that this may
cause the elements to be expanded (depending on the setting of <code><a href="maxima_14.html#ratfac">ratfac</a></code>
)
which might not always be desired.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
 &middot;
<a href="maxima_99.html#Category_003a-Rational-expressions">Rational expressions</a>
</p>
</div>

</dd></dl>

<p><a name="row"></a>
<a name="Item_003a-row"></a>
</p><dl>
<dt><u>Function:</u> <b>row</b><i> (<var>M</var>, <var>i</var>)</i>
<a name="IDX998"></a>
</dt>
<dd><p>Returns the <var>i</var>'th row of the matrix <var>M</var>.
The return value is a matrix.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="rmxchar"></a>
<a name="Item_003a-rmxchar"></a>
</p><dl>
<dt><u>Option variable:</u> <b>rmxchar</b>
<a name="IDX999"></a>
</dt>
<dd><p>Default value: <code>]</code>
</p>
<p><code>rmxchar</code> is the character drawn on the right-hand side of a matrix.
</p>
<p>See also <code><a href="#lmxchar">lmxchar</a></code>.
</p>

<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Display-flags-and-variables">Display flags and variables</a>
</p>
</div>

</dd></dl>

<p><a name="scalarmatrixp"></a>
<a name="Item_003a-scalarmatrixp"></a>
</p><dl>
<dt><u>Option variable:</u> <b>scalarmatrixp</b>
<a name="IDX1000"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>When <code>scalarmatrixp</code> is <code>true</code>, then whenever a 1 x 1 matrix
is produced as a result of computing the dot product of matrices it
is simplified to a scalar, namely the sole element of the matrix.
</p>
<p>When <code>scalarmatrixp</code> is <code>all</code>,
then all 1 x 1 matrices are simplified to scalars.
</p>
<p>When <code>scalarmatrixp</code> is <code>false</code>, 1 x 1 matrices are not simplified
to scalars.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
 &middot;
<a href="maxima_99.html#Category_003a-Simplification-flags-and-variables">Simplification flags and variables</a>
</p>
</div>

</dd></dl>


<p><a name="scalefactors"></a>
<a name="Item_003a-scalefactors"></a>
</p><dl>
<dt><u>Function:</u> <b>scalefactors</b><i> (<var>coordinatetransform</var>)</i>
<a name="IDX1001"></a>
</dt>
<dd><p>Here the argument <var>coordinatetransform</var> evaluates to the form
<code>[[expression1, expression2, ...], indeterminate1, indeterminat2, ...]</code>,
where the variables <var>indeterminate1</var>, <var>indeterminate2</var>, etc. are the
curvilinear coordinate variables and where a set of rectangular Cartesian
components is given in terms of the curvilinear coordinates by
<code>[expression1, expression2, ...]</code>.  <code>coordinates</code> is set to the vector
<code>[indeterminate1, indeterminate2,...]</code>, and <code>dimension</code> is set to the
length of this vector.  SF[1], SF[2], &hellip;, SF[DIMENSION] are set to the
coordinate scale factors, and <code>sfprod</code> is set to the product of these scale
factors.  Initially, <code>coordinates</code> is <code>[X, Y, Z]</code>, <code>dimension</code>
is 3, and SF[1]=SF[2]=SF[3]=SFPROD=1, corresponding to 3-dimensional rectangular
Cartesian coordinates.  To expand an expression into physical components in the
current coordinate system, there is a function with usage of the form
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Package-vect">Package vect</a>
</p>
</div>

</dd></dl>

<p><a name="setelmx"></a>
<a name="Item_003a-setelmx"></a>
</p><dl>
<dt><u>Function:</u> <b>setelmx</b><i> (<var>x</var>, <var>i</var>, <var>j</var>, <var>M</var>)</i>
<a name="IDX1002"></a>
</dt>
<dd><p>Assigns <var>x</var> to the (<var>i</var>, <var>j</var>)'th element of the matrix <var>M</var>,
and returns the altered matrix.
</p>
<p><code><var>M</var> [<var>i</var>, <var>j</var>]: <var>x</var></code> has the same effect,
but returns <var>x</var> instead of <var>M</var>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="similaritytransform"></a>
<a name="simtran"></a>
<a name="Item_003a-similaritytransform"></a>
</p><dl>
<dt><u>Function:</u> <b>similaritytransform</b><i> (<var>M</var>)</i>
<a name="IDX1003"></a>
</dt>
<dt><u>Function:</u> <b>simtran</b><i> (<var>M</var>)</i>
<a name="IDX1004"></a>
</dt>
<dd><p><code>similaritytransform</code> computes a similarity transform of the matrix
<code>M</code>.  It returns a list which is the output of the <code>uniteigenvectors</code>
command.  In addition if the flag <code>nondiagonalizable</code> is <code>false</code> two
global matrices <code>leftmatrix</code> and <code>rightmatrix</code> are computed.  These
matrices have the property that <code>leftmatrix . <var>M</var> . rightmatrix</code> is a
diagonal matrix with the eigenvalues of <var>M</var> on the diagonal.  If
<code>nondiagonalizable</code> is <code>true</code> the left and right matrices are not
computed.
</p>
<p>If the flag <code>hermitianmatrix</code> is <code>true</code> then <code>leftmatrix</code> is the
complex conjugate of the transpose of <code>rightmatrix</code>.  Otherwise
<code>leftmatrix</code> is the inverse of <code>rightmatrix</code>.
</p>
<p><code>rightmatrix</code> is the matrix the columns of which are the unit
eigenvectors of <var>M</var>.  The other flags (see <code>eigenvalues</code> and
<code>eigenvectors</code>) have the same effects since
<code>similaritytransform</code> calls the other functions in the package in order
to be able to form <code>rightmatrix</code>.
</p>
<p><code>load (&quot;eigen&quot;)</code> loads this function.
</p>
<p><code>simtran</code> is a synonym for <code>similaritytransform</code>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Package-eigen">Package eigen</a>
</p>
</div>

</dd></dl>

<p><a name="sparse"></a>
<a name="Item_003a-sparse"></a>
</p><dl>
<dt><u>Option variable:</u> <b>sparse</b>
<a name="IDX1005"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>sparse</code> is <code>true</code>, and if <code>ratmx</code> is <code>true</code>, then
<code>determinant</code> will use special routines for computing sparse determinants.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="submatrix"></a>
<a name="Item_003a-submatrix"></a>
</p><dl>
<dt><u>Function:</u> <b>submatrix</b><i> (<var>i_1</var>, &hellip;, <var>i_m</var>, <var>M</var>, <var>j_1</var>, &hellip;, <var>j_n</var>)</i>
<a name="IDX1006"></a>
</dt>
<dt><u>Function:</u> <b>submatrix</b><i> (<var>i_1</var>, &hellip;, <var>i_m</var>, <var>M</var>)</i>
<a name="IDX1007"></a>
</dt>
<dt><u>Function:</u> <b>submatrix</b><i> (<var>M</var>, <var>j_1</var>, &hellip;, <var>j_n</var>)</i>
<a name="IDX1008"></a>
</dt>
<dd><p>Returns a new matrix composed of the matrix <var>M</var> with rows <var>i_1</var>,
&hellip;, <var>i_m</var> deleted, and columns <var>j_1</var>, &hellip;, <var>j_n</var> deleted.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="transpose"></a>
<a name="Item_003a-transpose"></a>
</p><dl>
<dt><u>Function:</u> <b>transpose</b><i> (<var>M</var>)</i>
<a name="IDX1009"></a>
</dt>
<dd><p>Returns the transpose of <var>M</var>.
</p>
<p>If <var>M</var> is a matrix, the return value is another matrix <var>N</var>
such that <code>N[i,j] = M[j,i]</code>.
</p>
<p>If <var>M</var> is a list, the return value is a matrix <var>N</var>
of <code>length (m)</code> rows and 1 column, such that <code>N[i,1] = M[i]</code>.
</p>
<p>Otherwise <var>M</var> is a symbol,
and the return value is a noun expression <code>'transpose (<var>M</var>)</code>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="triangularize"></a>
<a name="Item_003a-triangularize"></a>
</p><dl>
<dt><u>Function:</u> <b>triangularize</b><i> (<var>M</var>)</i>
<a name="IDX1010"></a>
</dt>
<dd><p>Returns the upper triangular form of the matrix <code>M</code>,
as produced by Gaussian elimination.
The return value is the same as <code>echelon</code>,
except that the leading nonzero coefficient in each row is not normalized to 1.
</p>
<p><code>lu_factor</code> and <code>cholesky</code> are other functions which yield
triangularized matrices.
</p>
<pre class="example">(%i1) M: matrix ([3, 7, aa, bb], [-1, 8, 5, 2], [9, 2, 11, 4]);
                       [  3   7  aa  bb ]
                       [                ]
(%o1)                  [ - 1  8  5   2  ]
                       [                ]
                       [  9   2  11  4  ]
(%i2) triangularize (M);
             [ - 1   8         5            2      ]
             [                                     ]
(%o2)        [  0   - 74     - 56         - 22     ]
             [                                     ]
             [  0    0    626 - 74 aa  238 - 74 bb ]
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Linear-equations">Linear equations</a>
 &middot;
<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>

<p><a name="uniteigenvectors"></a>
<a name="ueivects"></a>
<a name="Item_003a-uniteigenvectors"></a>
</p><dl>
<dt><u>Function:</u> <b>uniteigenvectors</b><i> (<var>M</var>)</i>
<a name="IDX1011"></a>
</dt>
<dt><u>Function:</u> <b>ueivects</b><i> (<var>M</var>)</i>
<a name="IDX1012"></a>
</dt>
<dd><p>Computes unit eigenvectors of the matrix <var>M</var>.
The return value is a list of lists, the first sublist of which is the
output of the <code>eigenvalues</code> command, and the other sublists of which are
the unit eigenvectors of the matrix corresponding to those eigenvalues
respectively.
</p>
<p>The flags mentioned in the description of the
<code>eigenvectors</code> command have the same effects in this one as well.
</p>
<p>When <code>knowneigvects</code> is <code>true</code>, the <code>eigen</code> package assumes
that the eigenvectors of the matrix are known to the user and are
stored under the global name <code>listeigvects</code>.  <code>listeigvects</code> should
be set to a list similar to the output of the <code>eigenvectors</code> command.
</p>
<p>If <code>knowneigvects</code> is set to <code>true</code> and the list of eigenvectors is
given the setting of the flag <code>nondiagonalizable</code> may not be correct.  If
that is the case please set it to the correct value.  The author assumes that
the user knows what he is doing and will not try to diagonalize a matrix the
eigenvectors of which do not span the vector space of the appropriate dimension.
</p>
<p><code>load (&quot;eigen&quot;)</code> loads this function.
</p>
<p><code>ueivects</code> is a synonym for <code>uniteigenvectors</code>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Package-eigen">Package eigen</a>
</p>
</div>

</dd></dl>

<p><a name="unitvector"></a>
<a name="uvect"></a>
<a name="Item_003a-unitvector"></a>
</p><dl>
<dt><u>Function:</u> <b>unitvector</b><i> (<var>x</var>)</i>
<a name="IDX1013"></a>
</dt>
<dt><u>Function:</u> <b>uvect</b><i> (<var>x</var>)</i>
<a name="IDX1014"></a>
</dt>
<dd><p>Returns <em><var>x</var>/norm(<var>x</var>)</em>;
this is a unit vector in the same direction as <var>x</var>.
</p>
<p><code>load (&quot;eigen&quot;)</code> loads this function.
</p>
<p><code>uvect</code> is a synonym for <code>unitvector</code>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Package-eigen">Package eigen</a>
</p>
</div>

</dd></dl>


<p><a name="vectorpotential"></a>
<a name="Item_003a-vectorpotential"></a>
</p><dl>
<dt><u>Function:</u> <b>vectorpotential</b><i> (<var>givencurl</var>)</i>
<a name="IDX1015"></a>
</dt>
<dd><p>Returns the vector potential of a given curl vector, in the current coordinate
system.  <code>potentialzeroloc</code> has a similar role as for <code>potential</code>, but
the order of the left-hand sides of the equations must be a cyclic permutation
of the coordinate variables.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Package-vect">Package vect</a>
</p>
</div>

</dd></dl>


<p><a name="vectorsimp"></a>
<a name="Item_003a-vectorsimp"></a>
</p><dl>
<dt><u>Function:</u> <b>vectorsimp</b><i> (<var>expr</var>)</i>
<a name="IDX1016"></a>
</dt>
<dd><p>Applies simplifications and expansions according to the following global flags:
</p>
<p align="left"><code>expandall</code>, <code>expanddot</code>, <code>expanddotplus</code>, <code>expandcross</code>, <code>expandcrossplus</code>,
<code>expandcrosscross</code>, <code>expandgrad</code>, <code>expandgradplus</code>, <code>expandgradprod</code>,
<code>expanddiv</code>, <code>expanddivplus</code>, <code>expanddivprod</code>, <code>expandcurl</code>, <code>expandcurlplus</code>,
<code>expandcurlcurl</code>, <code>expandlaplacian</code>, <code>expandlaplacianplus</code>,
and <code>expandlaplacianprod</code>.
</p>
<p>All these flags have default value <code>false</code>.  The <code>plus</code> suffix refers
to employing additivity or distributivity.  The <code>prod</code> suffix refers to the
expansion for an operand that is any kind of product.
</p>
<dl compact="compact">
<dt> <code>expandcrosscross</code></dt>
<dd><p>Simplifies <em>p ~ (q ~ r)</em> to <em>(p . r)*q - (p . q)*r</em>.
</p></dd>
<dt> <code>expandcurlcurl</code></dt>
<dd><p>Simplifies <em>curl curl p</em> to <em>grad div p + div grad p</em>.
</p></dd>
<dt> <code>expandlaplaciantodivgrad</code></dt>
<dd><p>Simplifies <em>laplacian p</em> to <em>div grad p</em>.
</p></dd>
<dt> <code>expandcross</code></dt>
<dd><p>Enables <code>expandcrossplus</code> and <code>expandcrosscross</code>.
</p></dd>
<dt> <code>expandplus</code></dt>
<dd><p align="left">Enables <code>expanddotplus</code>, <code>expandcrossplus</code>, <code>expandgradplus</code>,
<code>expanddivplus</code>, <code>expandcurlplus</code>, and <code>expandlaplacianplus</code>.
</p></dd>
<dt> <code>expandprod</code></dt>
<dd><p>Enables <code>expandgradprod</code>, <code>expanddivprod</code>, and <code>expandlaplacianprod</code>.
</p></dd>
</dl>

<p>These flags have all been declared <code>evflag</code>.
</p>

<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Package-vect">Package vect</a>
 &middot;
<a href="maxima_99.html#Category_003a-Simplification-functions">Simplification functions</a>
</p>
</div>

</dd></dl>

<p><a name="vect_005fcross"></a>
<a name="Item_003a-vect_005fcross"></a>
</p><dl>
<dt><u>Option variable:</u> <b>vect_cross</b>
<a name="IDX1017"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>vect_cross</code> is <code>true</code>, it allows DIFF(X~Y,T) to work where
~ is defined in SHARE;VECT (where VECT_CROSS is set to <code>true</code>, anyway.)
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Package-vect">Package vect</a>
 &middot;
<a href="maxima_99.html#Category_003a-Differential-calculus">Differential calculus</a>
</p>
</div>

</dd></dl>

<p><a name="zeromatrix"></a>
<a name="Item_003a-zeromatrix"></a>
</p><dl>
<dt><u>Function:</u> <b>zeromatrix</b><i> (<var>m</var>, <var>n</var>)</i>
<a name="IDX1018"></a>
</dt>
<dd><p>Returns an <var>m</var> by <var>n</var> matrix, all elements of which are zero.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_99.html#Category_003a-Matrices">Matrices</a>
</p>
</div>

</dd></dl>


<p><a name="Item_003a-Affine"></a>
</p><hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC112" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima_24.html#SEC118" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_83.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p>
 <font size="-1">
  This document was generated by <em>root</em> on <em>May, 9 2012</em> using <a href="http://texi2html.cvshome.org/"><em>texi2html 1.76</em></a>.
 </font>
 <br>

</p>
</body>
</html>