# fcla / src / section-PDM.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 
Properties of Determinants of Matrices

We have seen how to compute the determinant of a matrix, and the incredible fact that we can perform expansion about any row or column to make this computation. In this largely theoretical section, we will state and prove several more intriguing properties about determinants. Our main goal will be the two results in and , but more specifically, we will see how the value of a determinant will allow us to gain insight into the various properties of a square matrix.

Determinants and Row Operations

We start easy with a straightforward theorem whose proof presages the style of subsequent proofs in this subsection.

Determinant with Zero Row or Column

Suppose that $A$ is a square matrix with a row where every entry is zero, or a column where every entry is zero. Then $\detname{A}=0$.

Suppose that $A$ is a square matrix of size $n$ and row $i$ has every entry equal to zero. We compute $\detname{A}$ via expansion about row $i$. \detname{A} \sum_{j=1}^{n}(-1)^{i+j}\matrixentry{A}{ij}\detname{\submatrix{A}{i}{j}} \text{}\\ \sum_{j=1}^{n}(-1)^{i+j}\,0\,\detname{\submatrix{A}{i}{j}} \sum_{j=1}^{n}0=0

The proof for the case of a zero column is entirely similar, or could be derived from an application of employing the transpose of the matrix.

Determinant for Row or Column Swap

Suppose that $A$ is a square matrix. Let $B$ be the square matrix obtained from $A$ by interchanging the location of two rows, or interchanging the location of two columns. Then $\detname{B}=-\detname{A}$.

Begin with the special case where $A$ is a square matrix of size $n$ and we form $B$ by swapping adjacent rows $i$ and $i+1$ for some $1\leq i\leq n-1$. Notice that the assumption about swapping adjacent rows means that $\submatrix{B}{i+1}{j}=\submatrix{A}{i}{j}$ for all $1\leq j\leq n$, and $\matrixentry{B}{i+1,j}=\matrixentry{A}{ij}$ for all $1\leq j\leq n$. We compute $\detname{B}$ via expansion about row $i+1$. \detname{B} \sum_{j=1}^{n}(-1)^{(i+1)+j}\matrixentry{B}{i+1,j}\detname{\submatrix{B}{i+1}{j}} \text{}\\ \sum_{j=1}^{n}(-1)^{(i+1)+j}\matrixentry{A}{ij}\detname{\submatrix{A}{i}{j}} \sum_{j=1}^{n}(-1)^{1}(-1)^{i+j}\matrixentry{A}{ij}\detname{\submatrix{A}{i}{j}}\\ (-1)\sum_{j=1}^{n}(-1)^{i+j}\matrixentry{A}{ij}\detname{\submatrix{A}{i}{j}}\\ \text{}

So the result holds for the special case where we swap adjacent rows of the matrix. As any computer scientist knows, we can accomplish any rearrangement of an ordered list by swapping adjacent elements. This principle can be demonstrated by na\"ive sorting algorithms such as bubble sort. In any event, we don't need to discuss every possible reordering, we just need to consider a swap of two rows, say rows $s$ and $t$ with

Begin with row $s$, and repeatedly swap it with each row just below it, including row $t$ and stopping there. This will total $t-s$ swaps. Now swap the former row $t$, which currently lives in row $t-1$, with each row above it, stopping when it becomes row $s$. This will total another $t-s-1$ swaps. In this way, we create $B$ through a sequence of $2(t-s)-1$ swaps of adjacent rows, each of which adjusts $\detname{A}$ by a multiplicative factor of $-1$. So \detname{B} = (-1)^{2(t-s)-1}\detname{A} = \left((-1)^2\right)^{t-s}(-1)^{-1}\detname{A} = -\detname{A} as desired.

The proof for the case of swapping two columns is entirely similar, or could be derived from an application of employing the transpose of the matrix.

So tells us the effect of the first row operation () on the determinant of a matrix. Here's the effect of the second row operation.

Determinant for Row or Column Multiples

Suppose that $A$ is a square matrix. Let $B$ be the square matrix obtained from $A$ by multiplying a single row by the scalar $\alpha$, or by multiplying a single column by the scalar $\alpha$. Then $\detname{B}=\alpha\detname{A}$.

Suppose that $A$ is a square matrix of size $n$ and we form the square matrix $B$ by multiplying each entry of row $i$ of $A$ by $\alpha$. Notice that the other rows of $A$ and $B$ are equal, so $\submatrix{A}{i}{j}=\submatrix{B}{i}{j}$, for all $1\leq j\leq n$. We compute $\detname{B}$ via expansion about row $i$. \detname{B} \sum_{j=1}^{n}(-1)^{i+j}\matrixentry{B}{ij}\detname{\submatrix{B}{i}{j}} \text{}\\ \sum_{j=1}^{n}(-1)^{i+j}\matrixentry{B}{ij}\detname{\submatrix{A}{i}{j}} \sum_{j=1}^{n}(-1)^{i+j}\alpha\matrixentry{A}{ij}\detname{\submatrix{A}{i}{j}} \alpha\sum_{j=1}^{n}(-1)^{i+j}\matrixentry{A}{ij}\detname{\submatrix{A}{i}{j}}\\ \text{}\\

The proof for the case of a multiple of a column is entirely similar, or could be derived from an application of employing the transpose of the matrix.

Let's go for understanding the effect of all three row operations. But first we need an intermediate result, but it is an easy one.

Determinant with Equal Rows or Columns

Suppose that $A$ is a square matrix with two equal rows, or two equal columns. Then $\detname{A}=0$.

Suppose that $A$ is a square matrix of size $n$ where the two rows $s$ and $t$ are equal. Form the matrix $B$ by swapping rows $s$ and $t$. Notice that as a consequence of our hypothesis, $A=B$. Then \detname{A} \frac{1}{2}\left(\detname{A}+\detname{A}\right)\\ \frac{1}{2}\left(\detname{A}-\detname{B}\right) \text{}\\ \frac{1}{2}\left(\detname{A}-\detname{A}\right) \frac{1}{2}\,(0)=0

The proof for the case of two equal columns is entirely similar, or could be derived from an application of employing the transpose of the matrix.

Now explain the third row operation. Here we go.

Determinant for Row or Column Multiples and Addition

Suppose that $A$ is a square matrix. Let $B$ be the square matrix obtained from $A$ by multiplying a row by the scalar $\alpha$ and then adding it to another row, or by multiplying a column by the scalar $\alpha$ and then adding it to another column. Then $\detname{B}=\detname{A}$.

Suppose that $A$ is a square matrix of size $n$. Form the matrix $B$ by multiplying row $s$ by $\alpha$ and adding it to row $t$. Let $C$ be the auxiliary matrix where we replace row $t$ of $A$ by row $s$ of $A$. Notice that $\submatrix{A}{t}{j}=\submatrix{B}{t}{j}=\submatrix{C}{t}{j}$ for all $1\leq j\leq n$. We compute the determinant of $B$ by expansion about row $t$. \detname{B} \sum_{j=1}^{n}(-1)^{t+j}\matrixentry{B}{tj}\detname{\submatrix{B}{t}{j}} \text{}\\ \sum_{j=1}^{n}(-1)^{t+j}\left(\alpha\matrixentry{A}{sj}+\matrixentry{A}{tj}\right)\detname{\submatrix{B}{t}{j}} \sum_{j=1}^{n}(-1)^{t+j}\alpha\matrixentry{A}{sj}\detname{\submatrix{B}{t}{j}}\\ \sum_{j=1}^{n}(-1)^{t+j}\matrixentry{A}{tj}\detname{\submatrix{B}{t}{j}}\\ \alpha\sum_{j=1}^{n}(-1)^{t+j}\matrixentry{A}{sj}\detname{\submatrix{B}{t}{j}}\\ \sum_{j=1}^{n}(-1)^{t+j}\matrixentry{A}{tj}\detname{\submatrix{B}{t}{j}}\\ \alpha\sum_{j=1}^{n}(-1)^{t+j}\matrixentry{C}{tj}\detname{\submatrix{C}{t}{j}}\\ \sum_{j=1}^{n}(-1)^{t+j}\matrixentry{A}{tj}\detname{\submatrix{A}{t}{j}}\\ \text{}\\ \text{}

The proof for the case of adding a multiple of a column is entirely similar, or could be derived from an application of employing the transpose of the matrix.

Is this what you expected? We could argue that the third row operation is the most popular, and yet it has no effect whatsoever on the determinant of a matrix! We can exploit this, along with our understanding of the other two row operations, to provide another approach to computing a determinant. We'll explain this in the context of an example.

Determinant by row operations

Suppose we desire the determinant of the $4\times 4$ matrix A= \begin{bmatrix} \end{bmatrix}

We will perform a sequence of row operations on this matrix, shooting for an upper triangular matrix, whose determinant will be simply the product of its diagonal entries. For each row operation, we will track the effect on the determinant via , , . \begin{bmatrix} \end{bmatrix} \\ \xrightarrow{\rowopswap{1}{2}} \begin{bmatrix} \end{bmatrix} \text{}\\ \xrightarrow{\rowopadd{-2}{1}{2}} \begin{bmatrix} \end{bmatrix} \text{}\\ \xrightarrow{\rowopadd{1}{1}{3}} \begin{bmatrix} \end{bmatrix} \text{}\\ \xrightarrow{\rowopadd{-3}{1}{4}} \begin{bmatrix} \end{bmatrix} \text{}\\ \xrightarrow{\rowopadd{1}{3}{2}} \begin{bmatrix} \end{bmatrix} \text{}\\ \xrightarrow{\rowopmult{-\frac{1}{2}}{2}} \begin{bmatrix} \end{bmatrix} \text{}\\ \xrightarrow{\rowopadd{-4}{2}{3}} \begin{bmatrix} \end{bmatrix} \text{}\\ \xrightarrow{\rowopadd{4}{2}{4}} \begin{bmatrix} \end{bmatrix} \text{}\\ \xrightarrow{\rowopadd{-1}{3}{4}} \begin{bmatrix} \end{bmatrix} \text{}\\ \xrightarrow{\rowopadd{-2}{4}{3}} \begin{bmatrix} \end{bmatrix} \text{}\\ \xrightarrow{\rowopswap{3}{4}} \begin{bmatrix} \end{bmatrix} \text{}\\ \xrightarrow{\rowopmult{\frac{1}{55}}{4}} \begin{bmatrix} \end{bmatrix} \text{}\\

The matrix $A_{12}$ is upper triangular, so expansion about the first column (repeatedly) will result in $\detname{A_{12}}=(1)(1)(1)(1)=1$ (see ) and thus, $\detname{A}=-110(1)=-110$.

Notice that our sequence of row operations was somewhat ad hoc, such as the transformation to $A_5$. We could have been even more methodical, and strictly followed the process that converts a matrix to reduced row-echelon form (), eventually achieving the same numerical result with a final matrix that equaled the $4\times 4$ identity matrix. Notice too that we could have stopped with $A_8$, since at this point we could compute $\detname{A_8}$ by two expansions about first columns, followed by a simple determinant of a $2\times 2$ matrix ().

The beauty of this approach is that computationally we should already have written a procedure to convert matrices to reduced-row echelon form, so all we need to do is track the multiplicative changes to the determinant as the algorithm proceeds. Further, for a square matrix of size $n$ this approach requires on the order of $n^3$ multiplications, while a recursive application of expansion about a row or column (, ) will require in the vicinity of $(n-1)(n!)$ multiplications. So even for very small matrices, a computational approach utilizing row operations will have superior run-time. Tracking, and controlling, the effects of round-off errors is another story, best saved for a numerical linear algebra course.

Determinants, Row Operations, Elementary Matrices

As a final preparation for our two most important theorems about determinants, we prove a handful of facts about the interplay of row operations and matrix multiplication with elementary matrices with regard to the determinant. But first, a simple, but crucial, fact about the identity matrix.

Determinant of the Identity Matrix

For every $n\geq 1$, $\detname{I_n}=1$.

It may be overkill, but this is a good situation to run through a proof by induction on $n$ (). Is the result true when $n=1$? Yes, \detname{I_1} \text{}\\ \text{}\\

Now assume the theorem is true for the identity matrix of size $n-1$ and investigate the determinant of the identity matrix of size $n$ with expansion about row 1, \detname{I_n} \sum_{j=1}^{n}(-1)^{1+j}\matrixentry{I_n}{1j}\detname{\submatrix{I_n}{1}{j}} \text{}\\ (-1)^{1+1}\matrixentry{I_n}{11}\detname{\submatrix{I_n}{1}{1}}\\ \sum_{j=2}^{n}(-1)^{1+j}\matrixentry{I_n}{1j}\detname{\submatrix{I_n}{1}{j}}\\ 1\detname{I_{n-1}}+ \sum_{j=2}^{n}(-1)^{1+j}\,0\,\detname{\submatrix{I_n}{1}{j}} \text{}\\ 1(1)+\sum_{j=2}^{n}\,0=1

Determinants of Elementary Matrices

For the three possible versions of an elementary matrix () we have the determinants,

1. $\detname{\elemswap{i}{j}}=-1$
2. $\detname{\elemmult{\alpha}{i}}=\alpha$
3. $\detname{\elemadd{\alpha}{i}{j}}=1$

Swapping rows $i$ and $j$ of the identity matrix will create $\elemswap{i}{j}$ (), so \detname{\elemswap{i}{j}} \text{}\\ \text{}\\

Multiplying row $i$ of the identity matrix by $\alpha$ will create $\elemmult{\alpha}{i}$ (), so \detname{\elemmult{\alpha}{i}} \text{}\\ \text{}\\

Multiplying row $i$ of the identity matrix by $\alpha$ and adding to row $j$ will create $\elemadd{\alpha}{i}{j}$ (), so \detname{\elemadd{\alpha}{i}{j}} \text{}\\ \text{}\\

Determinants, Elementary Matrices, Matrix Multiplication

Suppose that $A$ is a square matrix of size $n$ and $E$ is any elementary matrix of size $n$. Then \detname{EA}=\detname{E}\detname{A}

The proof procedes in three parts, one for each type of elementary matrix, with each part very similar to the other two.

First, let $B$ be the matrix obtained from $A$ by swapping rows $i$ and $j$, \detname{\elemswap{i}{j}A} \text{}\\ \text{}\\ \text{}

Second, let $B$ be the matrix obtained from $A$ by multiplying row $i$ by $\alpha$, \detname{\elemmult{\alpha}{i}A} \text{}\\ \text{}\\ \text{}

Third, let $B$ be the matrix obtained from $A$ by multiplying row $i$ by $\alpha$ and adding to row $j$, \detname{\elemadd{\alpha}{i}{j}A} \text{}\\ \text{}\\ \text{}

Since the desired result holds for each variety of elementary matrix individually, we are done.

Determinants, Nonsingular Matrices, Matrix Multiplication

If you asked someone with substantial experience working with matrices about the value of the determinant, they'd be likely to quote the following theorem as the first thing to come to mind.

Singular Matrices have Zero Determinants

Let $A$ be a square matrix. Then $A$ is singular if and only if $\detname{A}=0$.

Rather than jumping into the two halves of the equivalence, we first establish a few items. Let $B$ be the unique square matrix that is row-equivalent to $A$ and in reduced row-echelon form (, ). For each of the row operations that converts $B$ into $A$, there is an elementary matrix $E_i$ which effects the row operation by matrix multiplication (). Repeated applications of allow us to write A=E_sE_{s-1}\dots E_2E_1B

Then \detname{A} \detname{E_sE_{s-1}\dots E_2E_1B}\\ \text{}

From we can infer that the determinant of an elementary matrix is never zero (note the ban on $\alpha=0$ for $\elemmult{\alpha}{i}$ in ). So the product on the right is composed of nonzero scalars, with the possible exception of $\detname{B}$. More precisely, we can argue that $\detname{A}=0$ if and only if $\detname{B}=0$. With this established, we can take up the two halves of the equivalence.

If $A$ is singular, then by , $B$ cannot be the identity matrix. Because (1) the number of pivot columns is equal to the number of nonzero rows, (2) not every column is a pivot column, and (3) $B$ is square, we see that $B$ must have a zero row. By the determinant of $B$ is zero, and by the above, we conclude that the determinant of $A$ is zero.

We will prove the contrapositive (). So assume $A$ is nonsingular, then by , $B$ is the identity matrix and tells us that $\detname{B}=1\neq 0$. With the argument above, we conclude that the determinant of $A$ is nonzero as well.

For the case of $2\times 2$ matrices you might compare the application of with the combination of the results stated in and .

Zero and nonzero determinant, Archetypes A and B

The coefficient matrix in has a zero determinant (check this!) while the coefficient matrix has a nonzero determinant (check this, too). These matrices are singular and nonsingular, respectively. This is exactly what says, and continues our list of contrasts between these two archetypes.

Since is an equivalence () we can expand on our growing list of equivalences about nonsingular matrices. The addition of the condition $\detname{A}\neq 0$ is one of the best motivations for learning about determinants.

Nonsingular Matrix Equivalences, Round 7

Suppose that $A$ is a square matrix of size $n$. The following are equivalent.

1. $A$ is nonsingular.
2. $A$ row-reduces to the identity matrix.
3. The null space of $A$ contains only the zero vector, $\nsp{A}=\set{\zerovector}$.
4. The linear system $\linearsystem{A}{\vect{b}}$ has a unique solution for every possible choice of $\vect{b}$.
5. The columns of $A$ are a linearly independent set.
6. $A$ is invertible.
7. The column space of $A$ is $\complex{n}$, $\csp{A}=\complex{n}$.
8. The columns of $A$ are a basis for $\complex{n}$.
9. The rank of $A$ is $n$, $\rank{A}=n$.
10. The nullity of $A$ is zero, $\nullity{A}=0$.
11. The determinant of $A$ is nonzero, $\detname{A}\neq 0$.

says $A$ is singular if and only if $\detname{A}=0$. If we negate each of these statements, we arrive at two contrapositives that we can combine as the equivalence, $A$ is nonsingular if and only if $\detname{A}\neq 0$. This allows us to add a new statement to the list found in .

Computationally, row-reducing a matrix is the most efficient way to determine if a matrix is nonsingular, though the effect of using division in a computer can lead to round-off errors that confuse small quantities with critical zero quantities. Conceptually, the determinant may seem the most efficient way to determine if a matrix is nonsingular. The definition of a determinant uses just addition, subtraction and multiplication, so division is never a problem. And the final test is easy: is the determinant zero or not? However, the number of operations involved in computing a determinant by the definition very quickly becomes so excessive as to be impractical.

Now for the coup de grace. We will generalize to the case of any two square matrices. You may recall thinking that matrix multiplication was defined in a needlessly complicated manner. For sure, the definition of a determinant seems even stranger. (Though might be forcing you to reconsider.) Read the statement of the next theorem and contemplate how nicely matrix multiplication and determinants play with each other.

Determinant Respects Matrix Multiplication

Suppose that $A$ and $B$ are square matrices of the same size. Then $\detname{AB}=\detname{A}\detname{B}$.

This proof is constructed in two cases. First, suppose that $A$ is singular. Then $\detname{A}=0$ by . By the contrapositive of , $AB$ is singular as well. So by a second application of, $\detname{AB}=0$. Putting it all together \detname{AB}=0=0\,\detname{B}=\detname{A}\detname{B} as desired.

For the second case, suppose that $A$ is nonsingular. By there are elementary matrices $E_{1},\,E_{2},\,E_{3},\,\dots,\,E_{s}$ such that $A=E_1E_2E_3\dots E_s$. Then \detname{AB} \detname{E_1E_2E_3\dots E_{s}B}\\ \detname{E_1}\detname{E_2}\detname{E_3}\dots\detname{E_s}\detname{B} \text{}\\ \detname{E_1E_2E_3\dots E_s}\detname{B} \text{}\\ \detname{A}\detname{B}

It is amazing that matrix multiplication and the determinant interact this way. Might it also be true that $\detname{A+B}=\detname{A}+\detname{B}$? ()

Nonsingular Matrices, Round 7 Our latest addition to the NME series is sometimes considered the best computational way to determine if a matrix is nonsingular. While computing a single number for a comparison to zero is a very appealing process, other properties of nonsingular matrices are faster for determining if a matrix is nonsingular. Still, it is a worthwhile equivalence. We illustrate both directions. A = matrix(QQ, [[ 1, 0, 2, 1, 1, -3, 4, -6], [ 0, 1, 0, 5, 3, -8, 0, 6], [ 1, 1, 4, 4, 2, -8, 4, -2], [ 0, 1, 6, 0, -2, -1, 1, 0], [-1, 1, 0, 1, 0, -2, -1, 5], [ 0, -1, -6, -3, 1, 4, 1, -5], [-1, -1, -2, -3, -2, 7, -4, 2], [ 0, 2, 0, 0, -2, -2, 0, 6]]) A.is_singular() False A.determinant() 4 B = matrix(QQ, [[ 2, -1, 0, 4, -6, -2, 8, -2], [-1, 1, -1, -4, -1, 7, -7, -2], [-1, 1, 1, 0, 7, -5, -6, 7], [ 2, -1, -1, 3, -5, -2, 5, 2], [ 1, -2, 0, 2, -1, -3, 8, 0], [-1, 1, 0, -2, 6, -1, -8, 5], [ 2, -1, -1, 2, -7, 1, 7, -3], [-1, 0, 1, 0, 6, -4, -2, 4]]) B.is_singular() True B.determinant() 0 Properties of Determinants of Matrices There are many properties of determinants detailed in this section. You have the tools in Sage to explore all of them. We will illustrate with just two. One is not particularly deep, but we personally find the interplay between matrix multiplication and the determinant nothing short of amazing, so we will not pass up the chance to verify . Add some checks of other properties yourself.

We copy the sixth row of the matrix C to the fourth row, so by , the determinant is zero. C = matrix(QQ, [[-3, 4, 0, 1, 2, 0, 5, 0], [ 4, 0, -4, 7, 0, 5, 0, 5], [ 7, 4, 2, 2, 4, 0, -2, 8], [ 5, -4, 8, 2, 6, -1, -4, -4], [ 8, 0, 7, 4, 7, 5, 2, -3], [ 6, 5, 3, 7, 4, 2, 4, -3], [ 1, 6, -4, -4, 3, 8, 5, -2], [ 2, 4, -2, 8, 2, 5, 2, 2]]) C[3] = C[5] C [-3 4 0 1 2 0 5 0] [ 4 0 -4 7 0 5 0 5] [ 7 4 2 2 4 0 -2 8] [ 6 5 3 7 4 2 4 -3] [ 8 0 7 4 7 5 2 -3] [ 6 5 3 7 4 2 4 -3] [ 1 6 -4 -4 3 8 5 -2] [ 2 4 -2 8 2 5 2 2] C.determinant() 0 Now, a demonstration of . A = matrix(QQ, [[-4, 7, -2, 6, 8, 0, -4, 6], [ 1, 6, 5, 8, 2, 3, 1, -1], [ 5, 0, 7, -3, 7, -3, 6, -3], [-4, 5, 8, 3, 6, 8, -1, -1], [ 0, 0, -3, -3, 4, 4, 2, 5], [-3, -2, -3, 8, 8, -3, -1, 1], [-4, 0, 2, 4, 4, 4, 7, 2], [ 3, 3, -4, 5, -2, 3, -1, 5]]) B = matrix(QQ, [[ 1, 2, -4, 8, -1, 2, -1, -3], [ 3, 3, -2, -4, -3, 8, 1, 6], [ 1, 8, 4, 0, 4, -2, 0, 8], [ 6, 8, 1, -1, -4, -3, -2, 5], [ 0, 5, 1, 4, -3, 2, -3, -2], [ 2, 4, 0, 7, 8, -1, 5, 8], [ 7, 1, 1, -1, -1, 7, -2, 6], [ 2, 3, 4, 7, 3, 4, 7, -2]]) C = A*B; C [ 35 99 28 12 -51 46 25 16] [ 83 144 11 -3 -17 20 -11 141] [ 24 62 6 23 -25 52 -68 30] [ 44 153 42 19 53 0 20 169] [ 11 5 11 80 33 53 45 -13] [ 25 58 23 -5 -79 -24 -45 -35] [ 83 89 47 15 15 37 4 110] [ 47 39 -12 56 -2 29 48 14] Adet = A.determinant(); Adet 9350730 Bdet = B.determinant(); Bdet 6516260 Cdet = C.determinant(); Cdet 60931787869800 Adet*Bdet == Cdet True Earlier, in we used the random_matrix() constructor with the algorithm='unimodular' keyword to create a nonsingular matrix. We can now reveal that in this context, unimodular means with determinant 1. So such a matrix will always be nonsingular by . But more can be said. It is not obvious at all, and has just a partial explanation, but the inverse of a unimodular matrix with all integer entries will have an inverse with all integer entries.

With a fraction-free inverse many textbook exercises can be constructed through the use of unimodular matrices. Experiment for yourself below. An upper_bound keyword can be used to control the size of the entries of the matrix, though this will have little control over the inverse. A = random_matrix(QQ, 5, algorithm='unimodular') A, A.inverse() # random ( [ -9 -32 -118 273 78] [-186 30 22 -18 375] [ 2 9 31 -69 -21] [ 52 -8 -8 3 -105] [ 4 15 54 -120 -39] [-147 25 19 -12 297] [ -3 -11 -38 84 28] [ -47 8 6 -4 95] [ -5 -18 -66 152 44], [ -58 10 7 -5 117] )
1. Consider the two matrices below, and suppose you already have computed $\detname{A}=-120$. What is $\detname{B}$? Why? \begin{bmatrix} \end{bmatrix} \begin{bmatrix} \end{bmatrix}
2. State the theorem that allows us to make yet another extension to our NMEx series of theorems.
3. What is amazing about the interaction between matrix multiplication and the determinant?
Each of the archetypes below is a system of equations with a square coefficient matrix, or is a square matrix itself. Compute the determinant of each matrix, noting how indicates when the matrix is singular or nonsingular.

, , , ,
Construct a $3\times 3$ nonsingular matrix and call it $A$. Then, for each entry of the matrix, compute the corresponding cofactor, and create a new $3\times 3$ matrix full of these cofactors by placing the cofactor of an entry in the same location as the entry it was based on. Once complete, call this matrix $C$. Compute $A\transpose{C}$. Any observations? Repeat with a new matrix, or perhaps with a $4\times 4$ matrix. The result of these computations should be a matrix with the value of $\detname{A}$ in the diagonal entries and zeros elsewhere. The suggestion of using a nonsingular matrix was partially so that it was obvious that the value of the determinant appears on the diagonal.

This result (which is true in general) provides a method for computing the inverse of a nonsingular matrix. Since $A\transpose{C}=\detname{A}I_n$, we can multiply by the reciprocal of the determinant (which is nonzero!) and the inverse of $A$ (it exists!) to arrive at an expression for the matrix inverse: \inverse{A}=\frac{1}{\detname{A}}\transpose{C}
Construct an example to show that the following statement is not true for all square matrices $A$ and $B$ of the same size: $\detname{A+B}=\detname{A}+\detname{B}$. says that if the product of square matrices $AB$ is nonsingular, then the individual matrices $A$ and $B$ are nonsingular also. Construct a new proof of this result making use of theorems about determinants of matrices. Use to prove as a corollary. (See .) Suppose that $A$ is a square matrix of size $n$ and $\alpha\in\complex{\null}$ is a scalar. Prove that $\detname{\alpha A}=\alpha^n\detname{A}$. Employ to construct the second half of the proof of (the portion about a multiple of a column).