# fcla / src / section-DM.xml

  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 
Determinant of a Matrix

Before we define the determinant of a matrix, we take a slight detour to introduce elementary matrices. These will bring us back to the beginning of the course and our old friend, row operations.

Elementary Matrices

Elementary matrices are very simple, as you might have suspected from their name. Their purpose is to effect row operations () on a matrix through matrix multiplication (). Their definitions look much more complicated than they really are, so be sure to skip over them on your first reading and head right for the explanation that follows and the first example.

Elementary Matrices

1. For $i\neq j$, $\elemswap{i}{j}$ is the square matrix of size $n$ with \matrixentry{\elemswap{i}{j}}{k\ell}= \begin{cases} \end{cases}
2. For $\alpha\neq 0$, $\elemmult{\alpha}{i}$ is the square matrix of size $n$ with \matrixentry{\elemmult{\alpha}{i}}{k\ell}= \begin{cases} \end{cases}
3. For $i\neq j$, $\elemadd{\alpha}{i}{j}$ is the square matrix of size $n$ with \matrixentry{\elemadd{\alpha}{i}{j}}{k\ell}= \begin{cases} \end{cases}

Elementary Matrix, Swap $\elemswap{i}{j}$ Elementary Matrix, Multiply $\elemmult{\alpha}{i}$ Elementary Matrix, Add $\elemadd{\alpha}{i}{j}$

Again, these matrices are not as complicated as their definitions suggest, since they are just small perturbations of the $n\times n$ identity matrix (). $\elemswap{i}{j}$ is the identity matrix with rows (or columns) $i$ and $j$ trading places, $\elemmult{\alpha}{i}$ is the identity matrix where the diagonal entry in row $i$ and column $i$ has been replaced by $\alpha$, and $\elemadd{\alpha}{i}{j}$ is the identity matrix where the entry in row $j$ and column $i$ has been replaced by $\alpha$. (Yes, those subscripts look backwards in the description of $\elemadd{\alpha}{i}{j}$). Notice that our notation makes no reference to the size of the elementary matrix, since this will always be apparent from the context, or unimportant.

The raison d'etre for elementary matrices is to do row operations on matrices with matrix multiplication. So here is an example where we will both see some elementary matrices and see how they accomplish row operations when used with matrix multiplication.

Elementary matrices and row operations

We will perform a sequence of row operations () on the $3\times 4$ matrix $A$, while also multiplying the matrix on the left by the appropriate $3\times 3$ elementary matrix. A= \begin{bmatrix} \end{bmatrix} \begin{bmatrix} \end{bmatrix} \begin{bmatrix} \end{bmatrix} \begin{bmatrix} \end{bmatrix} = \begin{bmatrix} \end{bmatrix}\\ \begin{bmatrix} \end{bmatrix} \begin{bmatrix} \end{bmatrix} \begin{bmatrix} \end{bmatrix} = \begin{bmatrix} \end{bmatrix}\\ \begin{bmatrix} \end{bmatrix} \begin{bmatrix} \end{bmatrix} \begin{bmatrix} \end{bmatrix} = \begin{bmatrix} \end{bmatrix}

The next three theorems establish that each elementary matrix effects a row operation via matrix multiplication.

Elementary Matrices Do Row Operations

Suppose that $A$ is an $m\times n$ matrix, and $B$ is a matrix of the same size that is obtained from $A$ by a single row operation (). Then there is an elementary matrix of size $m$ that will convert $A$ to $B$ via matrix multiplication on the left. More precisely,

1. If the row operation swaps rows $i$ and $j$, then $B=\elemswap{i}{j}A$.
2. If the row operation multiplies row $i$ by $\alpha$, then $B=\elemmult{\alpha}{i}A$.
3. If the row operation multiplies row $i$ by $\alpha$ and adds the result to row $j$, then $B=\elemadd{\alpha}{i}{j}A$.

In each of the three conclusions, performing the row operation on $A$ will create the matrix $B$ where only one or two rows will have changed. So we will establish the equality of the matrix entries row by row, first for the unchanged rows, then for the changed rows, showing in each case that the result of the matrix product is the same as the result of the row operation. Here we go.

Row $k$ of the product $\elemswap{i}{j}A$, where $k\neq i$, $k\neq j$, is unchanged from $A$, \matrixentry{\elemswap{i}{j}A}{k\ell} \text{}\\ \sum_{\substack{p=1\\p\neq k}}^{n}\matrixentry{\elemswap{i}{j}}{kp}\matrixentry{A}{p\ell} \text{}\\ \sum_{\substack{p=1\\p\neq k}}^{n}0\matrixentry{A}{p\ell} \text{}\\

Row $i$ of the product $\elemswap{i}{j}A$ is row $j$ of $A$, \matrixentry{\elemswap{i}{j}A}{i\ell} \text{}\\ \sum_{\substack{p=1\\p\neq j}}^{n}\matrixentry{\elemswap{i}{j}}{ip}\matrixentry{A}{p\ell} \text{}\\ \sum_{\substack{p=1\\p\neq j}}^{n}0\matrixentry{A}{p\ell} \text{}\\

Row $j$ of the product $\elemswap{i}{j}A$ is row $i$ of $A$, \matrixentry{\elemswap{i}{j}A}{j\ell} \text{}\\ \sum_{\substack{p=1\\p\neq i}}^{n}\matrixentry{\elemswap{i}{j}}{jp}\matrixentry{A}{p\ell} \text{}\\ \text{}\\

So the matrix product $\elemswap{i}{j}A$ is the same as the row operation that swaps rows $i$ and $j$.

Row $k$ of the product $\elemmult{\alpha}{i}A$, where $k\neq i$, is unchanged from $A$, \matrixentry{\elemmult{\alpha}{i}A}{k\ell} \text{}\\ \sum_{\substack{p=1\\p\neq k}}^{n}\matrixentry{\elemmult{\alpha}{i}}{kp}\matrixentry{A}{p\ell} \text{}\\ \text{}\\

Row $i$ of the product $\elemmult{\alpha}{i}A$ is $\alpha$ times row $i$ of $A$, \matrixentry{\elemmult{\alpha}{i}A}{i\ell} \text{}\\ \sum_{\substack{p=1\\p\neq i}}^{n}\matrixentry{\elemmult{\alpha}{i}}{ip}\matrixentry{A}{p\ell} \text{}\\ \text{}\\

So the matrix product $\elemmult{\alpha}{i}A$ is the same as the row operation that swaps multiplies row $i$ by $\alpha$.

Row $k$ of the product $\elemadd{\alpha}{i}{j}A$, where $k\neq j$, is unchanged from $A$, \matrixentry{\elemadd{\alpha}{i}{j}A}{k\ell} \text{}\\ \sum_{\substack{p=1\\p\neq k}}^{n}\matrixentry{\elemadd{\alpha}{i}{j}}{kp}\matrixentry{A}{p\ell} \text{}\\ \text{}\\

Row $j$ of the product $\elemadd{\alpha}{i}{j}A$, is $\alpha$ times row $i$ of $A$ and then added to row $j$ of $A$, \matrixentry{\elemadd{\alpha}{i}{j}A}{j\ell} \text{}\\ \sum_{\substack{p=1\\p\neq j,i}}^{n}\matrixentry{\elemadd{\alpha}{i}{j}}{jp}\matrixentry{A}{p\ell} \text{}\\ \text{}\\

So the matrix product $\elemadd{\alpha}{i}{j}A$ is the same as the row operation that multiplies row $i$ by $\alpha$ and adds the result to row $j$.

Later in this section we will need two facts about elementary matrices.

Elementary Matrices are Nonsingular

If $E$ is an elementary matrix, then $E$ is nonsingular.

We show that we can row-reduce each elementary matrix to the identity matrix. Given an elementary matrix of the form $\elemswap{i}{j}$, perform the row operation that swaps row $j$ with row $i$. Given an elementary matrix of the form $\elemmult{\alpha}{i}$, with $\alpha\neq 0$, perform the row operation that multiplies row $i$ by $1/\alpha$. Given an elementary matrix of the form $\elemadd{\alpha}{i}{j}$, with $\alpha\neq 0$, perform the row operation that multiplies row $i$ by $-\alpha$ and adds it to row $j$. In each case, the result of the single row operation is the identity matrix. So each elementary matrix is row-equivalent to the identity matrix, and by is nonsingular.

Notice that we have now made use of the nonzero restriction on $\alpha$ in the definition of $\elemmult{\alpha}{i}$. One more key property of elementary matrices.

Nonsingular Matrices are Products of Elementary Matrices

Suppose that $A$ is a nonsingular matrix. Then there exists elementary matrices $E_1,\,E_2,\,E_3,\,\dots,\,E_t$ so that $A=E_1 E_2 E_3\dots E_t$.

Since $A$ is nonsingular, it is row-equivalent to the identity matrix by , so there is a sequence of $t$ row operations that converts $I$ to $A$. For each of these row operations, form the associated elementary matrix from and denote these matrices by $E_1,\,E_2,\,E_3,\,\dots,\,E_t$. Applying the first row operation to $I$ yields the matrix $E_1I$. The second row operation yields $E_2(E_1I)$, and the third row operation creates $E_3E_2E_1I$. The result of the full sequence of $t$ row operations will yield $A$, so A= E_t\dots E_3E_2E_1I= E_t\dots E_3E_2E_1

Other than the cosmetic matter of re-indexing these elementary matrices in the opposite order, this is the desired result.

Elementary Matrices Each of the three types of elementary matrices can be constructed easily, with syntax similar to methods for performing row operations on matrices. Here we have three $4\times 4$ elementary matrices, in order: $\elemswap{1}{3}$, $\elemmult{7}{2}$, $\elemadd{9}{2}{4}$. Notice the change in numbering on the rows, and the order of the parameters. A = elementary_matrix(QQ, 4, row1=0, row2=2); A [0 0 1 0] [0 1 0 0] [1 0 0 0] [0 0 0 1] A = elementary_matrix(QQ, 4, row1=1, scale=7); A [1 0 0 0] [0 7 0 0] [0 0 1 0] [0 0 0 1] A = elementary_matrix(QQ, 4, row1=3, row2=1, scale=9); A [1 0 0 0] [0 1 0 0] [0 0 1 0] [0 9 0 1] Notice that row1 is always the row that is being changed. The keywords can be removed, but the scale keyword must be used to create the second type of elementary matrix, to avoid confusion with the first type.

We can illustrate some of the results of this section with two examples. First, we convert a matrix into a second matrix which is row-equivalent, and then accomplish the same thing with matrix multiplication and a product of elementary matrices. A = matrix(QQ, [[6, -2, 3, -2], [3, 3, 1, 8], [4, 0, 5, 4]]) B = copy(A) B.swap_rows(0,2) E1 = elementary_matrix(QQ, 3, row1=0, row2=2) B.rescale_row(1, 5) E2 = elementary_matrix(QQ, 3, row1=1, scale=5) B.add_multiple_of_row(1, 0, -3) E3 = elementary_matrix(QQ, 3, row1=1, row2=0, scale=-3) B [ 4 0 5 4] [ 3 15 -10 28] [ 6 -2 3 -2] E3*E2*E1*A [ 4 0 5 4] [ 3 15 -10 28] [ 6 -2 3 -2] B == E3*E2*E1*A True R = E3*E2*E1 R.is_singular() False R [ 0 0 1] [ 0 5 -3] [ 1 0 0] The matrix R, the product of three elementary matrices, can be construed as the collective effect of the three row operations employed. With more row operations, R might look even less like an identity matrix. As the product of nonsingular matrices (), R is nonsingular ().

The matrix B above is not in reduced row-echelon form (it was just row-equivalent to A). What if we were to begin with a matrix and track all of the row operations required to bring the matrix to reduced row-echelon form? As above, we could form the associated elementary matrices and form their product, creating a single matrix R that captures all of the row operations.

It turns out we have already done this. Extended echelon form is the subject of , whose second conclusion says that $B=JA$, where $A$ is the original matrix, and $B$ is the row-equivalent matrix in reduced row-echelon form. Then $J$ is a square nonsingular matrix that is the product of the sequence of elementary matrices associated with the sequence of row operations converting $A$ into $B$. There may be many, many different sequences of row operations that convert $A$ to $B$, but the requirement that extended echelon form be in reduced row-echelon form guarantees that $J$ is unique.
Definition of the Determinant

We'll now turn to the definition of a determinant and do some sample computations. The definition of the determinant function is recursive, that is, the determinant of a large matrix is defined in terms of the determinant of smaller matrices. To this end, we will make a few definitions.

SubMatrix

Suppose that $A$ is an $m\times n$ matrix. Then the submatrix $\submatrix{A}{i}{j}$ is the $(m-1)\times (n-1)$ matrix obtained from $A$ by removing row $i$ and column $j$.

SubMatrix $\submatrix{A}{i}{j}$
Some submatrices

For the matrix A= \begin{bmatrix} \end{bmatrix} we have the submatrices \submatrix{A}{2}{3} = \begin{bmatrix} \end{bmatrix} \submatrix{A}{3}{1} = \begin{bmatrix} \end{bmatrix}

Determinant of a Matrix

Suppose $A$ is a square matrix. Then its determinant, $\detname{A}=\detbars{A}$, is an element of $\complex{\null}$ defined recursively by:

1. If $A$ is a $1\times 1$ matrix, then $\detname{A}=\matrixentry{A}{11}$.
2. If $A$ is a matrix of size $n$ with $n\geq 2$, then \matrixentry{A}{11}\detname{\submatrix{A}{1}{1}} -\matrixentry{A}{12}\detname{\submatrix{A}{1}{2}} +\matrixentry{A}{13}\detname{\submatrix{A}{1}{3}}-\\ +\cdots +(-1)^{n+1}\matrixentry{A}{1n}\detname{\submatrix{A}{1}{n}}

Determinant of a Matrix, Bars $\detbars{A}$ Determinant of a Matrix, Functional $\detname{A}$

So to compute the determinant of a $5\times 5$ matrix we must build 5 submatrices, each of size $4$. To compute the determinants of each the $4\times 4$ matrices we need to create 4 submatrices each, these now of size $3$ and so on. To compute the determinant of a $10\times 10$ matrix would require computing the determinant of $10!=10\times 9\times 8\times 7\times 6\times 5\times 4\times 3\times 2=3,628,800$ $1\times 1$ matrices. Fortunately there are better ways. However this does suggest an excellent computer programming exercise to write a recursive procedure to compute a determinant.

Let's compute the determinant of a reasonably sized matrix by hand.

Determinant of a $3\times 3$ matrix

Suppose that we have the $3\times 3$ matrix A= \begin{bmatrix} \end{bmatrix}

Then \detname{A}=\detbars{A} \end{vmatrix}\\ 3 \begin{vmatrix} \end{vmatrix} -2 \begin{vmatrix} \end{vmatrix} +(-1) \begin{vmatrix} \end{vmatrix}\\ 3\left( 1\begin{vmatrix} 2\\ \end{vmatrix} -6\begin{vmatrix} -1 \end{vmatrix}\right) -2\left( 4\begin{vmatrix} 2 \end{vmatrix} -6\begin{vmatrix} -3 \end{vmatrix}\right) -\left( 4\begin{vmatrix} -1 \end{vmatrix} -1\begin{vmatrix} -3 \end{vmatrix}\right)\\ 3\left(1(2)-6(-1)\right) -2\left(4(2)-6(-3)\right) -\left(4(-1)-1(-3)\right)\\

In practice it is a bit silly to decompose a $2\times 2$ matrix down into a couple of $1\times 1$ matrices and then compute the exceedingly easy determinant of these puny matrices. So here is a simple theorem.

Determinant of Matrices of Size Two

Suppose that Then $\detname{A}=ad-bc$.

Do you recall seeing the expression $ad-bc$ before? (Hint: )

Computing Determinants

There are a variety of ways to compute the determinant. We will establish first that we can choose to mimic our definition of the determinant, but by using matrix entries and submatrices based on a row other than the first one.

Suppose that $A$ is a square matrix of size $n$. Then for $1\leq i\leq n$ (-1)^{i+1}\matrixentry{A}{i1}\detname{\submatrix{A}{i}{1}}+ (-1)^{i+2}\matrixentry{A}{i2}\detname{\submatrix{A}{i}{2}}\\ \cdots+ (-1)^{i+n}\matrixentry{A}{in}\detname{\submatrix{A}{i}{n}} which is known as expansion about row $i$.

First, the statement of the theorem coincides with when $i=1$, so throughout, we need only consider $i>1$.

Given the recursive definition of the determinant, it should be no surprise that we will use induction for this proof (). When $n=1$, there is nothing to prove since there is but one row. When $n=2$, we just examine expansion about the second row, (-1)^{2+2}\matrixentry{A}{22}\detname{\submatrix{A}{2}{2}}\\ \text{}\\ \text{}\\

So the theorem is true for matrices of size $n=1$ and $n=2$. Now assume the result is true for all matrices of size $n-1$ as we derive an expression for expansion about row $i$ for a matrix of size $n$. We will abuse our notation for a submatrix slightly, so $\submatrix{A}{i_1,i_2}{j_1,j_2}$ will denote the matrix formed by removing rows $i_1$ and $i_2$, along with removing columns $j_1$ and $j_2$. Also, as we take a determinant of a submatrix, we will need to jump up the index of summation partway through as we skip over a missing column. To do this smoothly we will set \epsilon_{\ell j}= \begin{cases} j]]> \end{cases}

Now, \sum_{j=1}^{n}(-1)^{1+j}\matrixentry{A}{1j}\detname{\submatrix{A}{1}{j}} \text{}\\ \sum_{j=1}^{n}(-1)^{1+j}\matrixentry{A}{1j} \sum_{\substack{1\leq\ell\leq n\\\ell\neq j}} (-1)^{i-1+\ell-\epsilon_{\ell j}}\matrixentry{A}{i\ell}\detname{\submatrix{A}{1,i}{j,\ell}} \sum_{j=1}^{n}\sum_{\substack{1\leq\ell\leq n\\\ell\neq j}} (-1)^{j+i+\ell-\epsilon_{\ell j}} \matrixentry{A}{1j}\matrixentry{A}{i\ell}\detname{\submatrix{A}{1,i}{j,\ell}} \text{}\\ \sum_{\ell=1}^{n}\sum_{\substack{1\leq j\leq n\\j\neq\ell}} (-1)^{j+i+\ell-\epsilon_{\ell j}} \matrixentry{A}{1j}\matrixentry{A}{i\ell}\detname{\submatrix{A}{1,i}{j,\ell}} \text{}\\ \sum_{\ell=1}^{n}(-1)^{i+\ell}\matrixentry{A}{i\ell} \sum_{\substack{1\leq j\leq n\\j\neq\ell}} (-1)^{j-\epsilon_{\ell j}} \matrixentry{A}{1j}\detname{\submatrix{A}{1,i}{j,\ell}} \text{}\\ \sum_{\ell=1}^{n}(-1)^{i+\ell}\matrixentry{A}{i\ell} \sum_{\substack{1\leq j\leq n\\j\neq\ell}} (-1)^{\epsilon_{\ell j}+j} \matrixentry{A}{1j}\detname{\submatrix{A}{i,1}{\ell,j}} \sum_{\ell=1}^{n}(-1)^{i+\ell}\matrixentry{A}{i\ell}\detname{\submatrix{A}{i}{\ell}} \text{}

We can also obtain a formula that computes a determinant by expansion about a column, but this will be simpler if we first prove a result about the interplay of determinants and transposes. Notice how the following proof makes use of the ability to compute a determinant by expanding about any row.

Determinant of the Transpose

Suppose that $A$ is a square matrix. Then $\detname{\transpose{A}}=\detname{A}$.

With our definition of the determinant () and theorems like , using induction () is a natural approach to proving properties of determinants. And so it is here. Let $n$ be the size of the matrix $A$, and we will use induction on $n$.

For $n=1$, the transpose of a matrix is identical to the original matrix, so vacuously, the determinants are equal.

Now assume the result is true for matrices of size $n-1$. Then, \detname{\transpose{A}} \frac{1}{n}\sum_{i=1}^{n}\sum_{j=1}^{n}(-1)^{i+j} \matrixentry{\transpose{A}}{ij}\detname{\submatrix{\transpose{A}}{i}{j}} \text{}\\ \frac{1}{n}\sum_{i=1}^{n}\sum_{j=1}^{n}(-1)^{i+j} \matrixentry{A}{ji}\detname{\submatrix{\transpose{A}}{i}{j}} \text{}\\ \frac{1}{n}\sum_{i=1}^{n}\sum_{j=1}^{n}(-1)^{i+j} \matrixentry{A}{ji}\detname{\transpose{\left(\submatrix{A}{j}{i}\right)}} \text{}\\ \frac{1}{n}\sum_{i=1}^{n}\sum_{j=1}^{n}(-1)^{i+j} \matrixentry{A}{ji}\detname{\submatrix{A}{j}{i}} \frac{1}{n}\sum_{j=1}^{n}\sum_{i=1}^{n}(-1)^{j+i} \matrixentry{A}{ji}\detname{\submatrix{A}{j}{i}} \text{}\\ \frac{1}{n}\sum_{j=1}^{n}\detname{A} \text{}\\

Now we can easily get the result that a determinant can be computed by expansion about any column as well.

Suppose that $A$ is a square matrix of size $n$. Then for $1\leq j\leq n$ (-1)^{1+j}\matrixentry{A}{1j}\detname{\submatrix{A}{1}{j}}+ (-1)^{2+j}\matrixentry{A}{2j}\detname{\submatrix{A}{2}{j}}\\ \cdots+ (-1)^{n+j}\matrixentry{A}{nj}\detname{\submatrix{A}{n}{j}} which is known as expansion about column $j$.

\detname{A} \text{}\\ \sum_{i=1}^{n}(-1)^{j+i}\matrixentry{\transpose{A}}{ji}\detname{\submatrix{\transpose{A}}{j}{i}} \text{}\\ \sum_{i=1}^{n}(-1)^{j+i}\matrixentry{\transpose{A}}{ji}\detname{\transpose{\left(\submatrix{A}{i}{j}\right)}} \text{}\\ \sum_{i=1}^{n}(-1)^{j+i}\matrixentry{\transpose{A}}{ji}\detname{\submatrix{A}{i}{j}} \text{}\\ \sum_{i=1}^{n}(-1)^{i+j}\matrixentry{A}{ij}\detname{\submatrix{A}{i}{j}} \text{}

That the determinant of an $n\times n$ matrix can be computed in $2n$ different (albeit similar) ways is nothing short of remarkable. For the doubters among us, we will do an example, computing a $4\times 4$ matrix in two different ways.

Two computations, same determinant

Let A= \begin{bmatrix} \end{bmatrix}

Then expanding about the fourth row ( with $i=4$) yields, \detbars{A} (4)(-1)^{4+1} \begin{vmatrix} \end{vmatrix} +(1)(-1)^{4+2} \begin{vmatrix} \end{vmatrix}\\ \begin{vmatrix} \end{vmatrix} +(6)(-1)^{4+4} \begin{vmatrix} \end{vmatrix}\\ (-4)(10)+(1)(-22)+(-2)(61)+6(46)=92

Expanding about column 3 ( with $j=3$) gives \detbars{A} (0)(-1)^{1+3} \begin{vmatrix} \end{vmatrix} + (0)(-1)^{2+3} \begin{vmatrix} \end{vmatrix} +\\ \begin{vmatrix} \end{vmatrix} + (2)(-1)^{4+3} \begin{vmatrix} \end{vmatrix}\\

Notice how much easier the second computation was. By choosing to expand about the third column, we have two entries that are zero, so two $3\times 3$ determinants need not be computed at all!

When a matrix has all zeros above (or below) the diagonal, exploiting the zeros by expanding about the proper row or column makes computing a determinant insanely easy.

Determinant of an upper triangular matrix

Suppose that T= \begin{bmatrix} \end{bmatrix}

We will compute the determinant of this $5\times 5$ matrix by consistently expanding about the first column for each submatrix that arises and does not have a zero entry multiplying it. \begin{vmatrix} \end{vmatrix}\\ \begin{vmatrix} \end{vmatrix}\\ \begin{vmatrix} \end{vmatrix}\\ \begin{vmatrix} \end{vmatrix}\\ \begin{vmatrix} 5 \end{vmatrix}\\

When you consult other texts in your study of determinants, you may run into the terms minor and cofactor, especially in a discussion centered on expansion about rows and columns. We've chosen not to make these definitions formally since we've been able to get along without them. However, informally, a minor is a determinant of a submatrix, specifically $\detname{\submatrix{A}{i}{j}}$ and is usually referenced as the minor of $\matrixentry{A}{ij}$. A cofactor is a signed minor, specifically the cofactor of $\matrixentry{A}{ij}$ is $(-1)^{i+j}\detname{\submatrix{A}{i}{j}}$.

Determinant of a Matrix Computing the determinant in Sage is straightforward. A = matrix(QQ,[[ 4, 3, -2, -9, -11, -14, -4, 11, -4, 4], [ 0, 1, 0, -1, -1, -3, -2, 3, 6, 15], [ 0, 1, 1, 1, 3, 0, -3, -5, -9, -3], [-3, 3, 3, 6, 12, 3, -9, -12, -9, 15], [-2, 0, 2, 3, 5, 3, -3, -5, -3, 7], [ 3, 3, -1, -7, -8, -12, -5, 8, -4, 9], [ 0, -1, 1, 2, 2, 5, 3, -6, -8, -12], [-1, -2, -1, 1, -2, 5, 6, 3, 6, -8], [ 2, 1, -3, -6, -8, -7, 0, 12, 11, 8], [-3, -2, 2, 5, 5, 9, 2, -7, -4, -3]]) A.determinant() 3 Random matrices, even with small entries, can have very large determinants. B = matrix(QQ, 15, [ [-5, -5, -5, 4, 1, 1, -3, 0, 4, 4, -2, -4, 2, 3, -1], [ 1, 1, -4, 3, 3, 4, 1, -1, -5, 4, -3, 0, -1, 0, 0], [ 3, 4, -2, 3, -1, -5, -1, -4, -5, 0, -1, 2, -4, -1, -1], [ 2, -4, 4, -3, -3, -3, -1, -3, -3, -1, 2, 4, -1, -1, -3], [ 1, 4, -3, -1, -2, -2, 1, -1, 3, -5, -4, -2, -2, -2, -5], [-1, -2, 4, 0, 4, 1, 1, 4, -5, 3, 1, -1, 4, 2, -2], [ 4, 3, 2, 4, 4, -5, 2, -5, -5, 2, -5, -4, -4, 0, 3], [ 1, -2, 0, -2, -2, 0, 2, 3, 1, 2, -4, 0, -5, -2, 2], [-4, -4, 2, 1, -1, 4, -2, 1, -2, 2, -1, -1, 3, 4, -1], [-4, 0, 2, 3, -4, -5, 3, -5, 4, -4, -2, 3, 3, -3, 0], [ 1, 2, 3, -4, 2, 0, -4, -1, 1, -3, 1, 4, -2, 4, -1], [-3, 3, 0, 2, 1, -2, -4, 0, -1, -1, -1, 2, 3, 1, -4], [ 4, 3, -3, -4, 3, 1, -3, 2, 1, -5, -5, -3, 2, 1, 4], [-3, -5, -1, -5, -2, 0, -3, 1, 2, -1, 0, -4, 3, -2, 3], [-1, 1, -3, -1, 3, -3, 2, -3, -5, -1, -1, 3, -1, 2, 3] ]) B.determinant() 202905135564 Sage is incredibly fast at computing determinants with rational entries. Try the following two compute cells on whatever computer you might be using right now. The one unfamilar command clears the value of the determinant that Sage caches, so we get accurate timing information across multiple evaluations. C = random_matrix(QQ, 100, 100) timeit("C.determinant(); C._cache={}") # random 5 loops, best of 3: 152 ms per loop C.determinant() # random -54987836999...175801344
1. Construct the elementary matrix that will effect the row operation $\rowopadd{-6}{2}{3}$ on a $4\times 7$ matrix.
2. Compute the determinant of the matrix \begin{bmatrix} \end{bmatrix}
3. Compute the determinant of the matrix \begin{bmatrix} \end{bmatrix}
Doing the computations by hand, find the determinant of the matrix below. \begin{bmatrix} \end{bmatrix} Using the formula in we have Doing the computations by hand, find the determinant of the matrix below. \begin{bmatrix} \end{bmatrix} Using the formula in we have Doing the computations by hand, find the determinant of the matrix below. \begin{bmatrix} \end{bmatrix} We can compute the determinant by expanding about any row or column; the most efficient ones to choose are either the second column or the third row. In any case, the determinant will be $-4$. Doing the computations by hand, find the determinant of the matrix below. \begin{bmatrix} \end{bmatrix} We'll expand about the first row since there are no zeros to exploit, \begin{vmatrix} \end{vmatrix} (-2)\begin{vmatrix} \end{vmatrix} + (-1)(3)\begin{vmatrix} \end{vmatrix} + (-2)\begin{vmatrix} \end{vmatrix}\\ Doing the computations by hand, find the determinant of the matrix below. \begin{bmatrix} \end{bmatrix} We can expand about any row or column, so the zero entry in the middle of the last row is attractive. Let's expand about column 2. By and you will get the same result by expanding about a different row or column. We will use twice. \begin{vmatrix} \end{vmatrix} (-1)(-1)^{1+2} \begin{vmatrix} \end{vmatrix} + (5)(-1)^{2+2} \begin{vmatrix} \end{vmatrix} + (0)(-1)^{3+2} \begin{vmatrix} \end{vmatrix}\\ Doing the computations by hand, find the determinant of the matrix $A$. A= \begin{bmatrix} \end{bmatrix} With two zeros in column 2, we choose to expand about that column (), \detname{A} \begin{vmatrix} \end{vmatrix}\\ 0(-1) \begin{vmatrix} \end{vmatrix} + 1(1) \begin{vmatrix} \end{vmatrix} + 0(-1) \begin{vmatrix} \end{vmatrix} + 3(1) \begin{vmatrix} \end{vmatrix}\\ (1)\left(2(1(1)-2(2)) - 3(3(1)-5(2)) + 2(3(2)-5(1))\right) +\\ (-6+21+2) + (3)(0+6-2) = 29 Doing the computations by hand, find the determinant of the matrix $A$. A= \begin{bmatrix} \end{bmatrix} Expanding on the first row, we have Doing the computations by hand, find the determinant of the matrix $A$. A= \begin{bmatrix} \end{bmatrix} Expanding along the first row, we have Doing the computations by hand, find the determinant of the matrix $A$. A= \begin{bmatrix} \end{bmatrix} Expanding along the first column, we have \begin{vmatrix} \end{vmatrix} 2 \begin{vmatrix} \end{vmatrix} + 0 + 0 + 0 + 0\\ Now, expanding along the first column again, we have \begin{vmatrix} \end{vmatrix} - 0 + \begin{vmatrix} \end{vmatrix} - 0 \right)\\ 2\left( [1 \cdot 1 \cdot 2 + 2 \cdot 0 \cdot 0 + 3 \cdot 2 \cdot 1 - 0 \cdot 1 \cdot 3 - 1 \cdot 0 \cdot 1 - 2 \cdot 2 \cdot 2] + \right.\\ \quad\left.[1 \cdot 2 \cdot 2 + 1 \cdot 3 \cdot 0 +2 \cdot 1 \cdot 1 -0 \cdot 2 \cdot 2 - 1 \cdot 3 \cdot 1 - 2 \cdot 1 \cdot 1]\right)\\ Doing the computations by hand, find the determinant of the matrix $A$. A= \begin{bmatrix} \end{bmatrix} In order to exploit the zeros, let's expand along row 3. We then have \begin{vmatrix} \end{vmatrix} \begin{vmatrix} \end{vmatrix} + (-1)^7 \cdot 2\begin{vmatrix} \end{vmatrix}\\ Notice that the second matrix here is singular since two rows are identical and thus it cannot row-reduce to an identity matrix. We now have \begin{vmatrix} \end{vmatrix} + 0\\ and now we expand on the first row of the first matrix: \begin{vmatrix} \end{vmatrix} - \begin{vmatrix} \end{vmatrix} + 0 - \begin{vmatrix} \end{vmatrix}\\ Find a value of $k$ so that the matrix $A = \begin{bmatrix} has$\det(A) = 0$, or explain why it is not possible. There is only one value of$k$that will make this matrix have a zero determinant. so$\detname{A} = 0$only when$k = 6$. Find a value of$k$so that the matrix$A = \begin{bmatrix} \end{bmatrix}$has$\det(A) = 0$, or explain why it is not possible. \begin{vmatrix} \end{vmatrix} = 7 - 4k Thus,$\detname{A} = 0$only when$k = \frac{7}{4}$. Given the matrix$B = \begin{bmatrix} \end{bmatrix}$, find all values of$x$that are solutions of$\det(B) = 0$. Using the formula for the determinant of a$2\times 2$matrix given in , we have \begin{vmatrix} \end{vmatrix} = (2 - x)(2 - x) - 4 = x^2 - 4x = x(x-4) and thus$\det{(B)} = 0$only when$x=0$or$x=4$. Given the matrix$B = \begin{bmatrix} \end{bmatrix}$, find all values of$x$that are solutions of$\det(B) = 0$. \detname{B} = -x(x^2 + 2x - 8) = -x(x-2)(x+4) And thus,$\detname{B}=0$when$x = 0$,$x = 2$, or$x = -4\$.