# fcla / src / section-MM.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 
Matrix Multiplication

We know how to add vectors and how to multiply them by scalars. Together, these operations give us the possibility of making linear combinations. Similarly, we know how to add matrices and how to multiply matrices by scalars. In this section we mix all these ideas together and produce an operation known as matrix multiplication. This will lead to some results that are both surprising and central. We begin with a definition of how to multiply a vector by a matrix.

Matrix-Vector Product

We have repeatedly seen the importance of forming linear combinations of the columns of a matrix. As one example of this, the oft-used , said that every solution to a system of linear equations gives rise to a linear combination of the column vectors of the coefficient matrix that equals the vector of constants. This theorem, and others, motivate the following central definition.

Matrix-Vector Product

Suppose $A$ is an $m\times n$ matrix with columns $\vectorlist{A}{n}$ and $\vect{u}$ is a vector of size $n$. Then the matrix-vector product of $A$ with $\vect{u}$ is the linear combination A\vect{u}= \vectorentry{\vect{u}}{1}\vect{A}_1+ \vectorentry{\vect{u}}{2}\vect{A}_2+ \vectorentry{\vect{u}}{3}\vect{A}_3+ \cdots+ \vectorentry{\vect{u}}{n}\vect{A}_n

Matrix-Vector Product $A\vect{u}$

So, the matrix-vector product is yet another version of multiplication, at least in the sense that we have yet again overloaded juxtaposition of two symbols as our notation. Remember your objects, an $m\times n$ matrix times a vector of size $n$ will create a vector of size $m$. So if $A$ is rectangular, then the size of the vector changes. With all the linear combinations we have performed so far, this computation should now seem second nature.

A matrix times a vector

Consider A= \begin{bmatrix} \end{bmatrix} \vect{u}=\colvector{2\\1\\-2\\3\\-1}

Then A\vect{u}= 2\colvector{1\\-3\\1}+ 1\colvector{4\\2\\6}+ (-2)\colvector{2\\0\\-3}+ 3\colvector{3\\1\\-1}+ (-1)\colvector{4\\-2\\5} = \colvector{7\\1\\6}.

We can now represent systems of linear equations compactly with a matrix-vector product () and column vector equality (). This finally yields a very popular alternative to our unconventional $\linearsystem{A}{\vect{b}}$ notation.

Systems of Linear Equations as Matrix Multiplication

The set of solutions to the linear system $\linearsystem{A}{\vect{b}}$ equals the set of solutions for $\vect{x}$ in the vector equation $A\vect{x}=\vect{b}$.

This theorem says that two sets (of solutions) are equal. So we need to show that one set of solutions is a subset of the other, and vice versa (). Let $\vectorlist{A}{n}$ be the columns of $A$. Both of these set inclusions then follow from the following chain of equivalences (), \vectorentry{\vect{x}}{1}\vect{A}_1+ \vectorentry{\vect{x}}{2}\vect{A}_2+ \vectorentry{\vect{x}}{3}\vect{A}_3+ \cdots+ \vectorentry{\vect{x}}{n}\vect{A}_n \text{}\\ \text{}

Matrix notation for systems of linear equations

Consider the system of linear equations from .

has coefficient matrix A= \begin{bmatrix} \end{bmatrix} and vector of constants \vect{b}=\colvector{9\\0\\-3} and so will be described compactly by the vector equation $A\vect{x}=\vect{b}$.

The matrix-vector product is a very natural computation. We have motivated it by its connections with systems of equations, but here is another example.

Money's best cities

Every year Money magazine selects several cities in the United States as the best cities to live in, based on a wide array of statistics about each city. This is an example of how the editors of Money might arrive at a single number that consolidates the statistics about a city. We will analyze Los Angeles, Chicago and New York City, based on four criteria: average high temperature in July (Farenheit), number of colleges and universities in a 30-mile radius, number of toxic waste sites in the Superfund environmental clean-up program and a personal crime index based on FBI statistics (average = 100, smaller is safer). It should be apparent how to generalize the example to a greater number of cities and a greater number of statistics.

We begin by building a table of statistics. The rows will be labeled with the cities, and the columns with statistical categories. These values are from Money's website in early 2005. \begin{tabular}{||l||c|c|c|c||}\hline \end{tabular}

CityTempCollegesSuperfundCrime
Los Angeles772893254
Chicago 843885363
New York 8499 1193
]]>

Conceivably these data might reside in a spreadsheet. Now we must combine the statistics for each city. We could accomplish this by weighting each category, scaling the values and summing them. The sizes of the weights would depend upon the numerical size of each statistic generally, but more importantly, they would reflect the editors opinions or beliefs about which statistics were most important to their readers. Is the crime index more important than the number of colleges and universities? Of course, there is no right answer to this question.

Suppose the editors finally decide on the following weights to employ: temperature, $0.23$; colleges, $0.46$; Superfund, $-0.05$; crime, $-0.20$. Notice how negative weights are used for undesirable statistics. Then, for example, the editors would compute for Los Angeles, (0.23)(77) + (0.46)(28) + (-0.05)(93) + (-0.20)(254) = -24.86

This computation might remind you of an inner product, but we will produce the computations for all of the cities as a matrix-vector product. Write the table of raw statistics as a matrix T= \begin{bmatrix} \end{bmatrix} and the weights as a vector \vect{w}=\colvector{0.23\\0.46\\-0.05\\-0.20} then the matrix-vector product () yields T\vect{w}= (0.23)\colvector{77\\84\\84}+ (0.46)\colvector{28\\38\\99}+ (-0.05)\colvector{93\\85\\1}+ (-0.20)\colvector{254\\363\\193} = \colvector{-24.86\\-40.05\\26.21}

This vector contains a single number for each of the cities being studied, so the editors would rank New York best ($26.21$), Los Angeles next ($-24.86$), and Chicago third ($-40.05$). Of course, the mayor's offices in Chicago and Los Angeles are free to counter with a different set of weights that cause their city to be ranked best. These alternative weights would be chosen to play to each cities' strengths, and minimize their problem areas.

If a speadsheet were used to make these computations, a row of weights would be entered somewhere near the table of data and the formulas in the spreadsheet would effect a matrix-vector product. This example is meant to illustrate how linear computations (addition, multiplication) can be organized as a matrix-vector product.

Another example would be the matrix of numerical scores on examinations and exercises for students in a class. The rows would correspond to students and the columns to exams and assignments. The instructor could then assign weights to the different exams and assignments, and via a matrix-vector product, compute a single score for each student.

Later (much later) we will need the following theorem, which is really a technical lemma (see ). Since we are in a position to prove it now, we will. But you can safely skip it for the moment, if you promise to come back later to study the proof when the theorem is employed. At that point you will also be able to understand the comments in the paragraph following the proof.

Equal Matrices and Matrix-Vector Products

Suppose that $A$ and $B$ are $m\times n$ matrices such that $A\vect{x}=B\vect{x}$ for every $\vect{x}\in\complex{n}$. Then $A=B$.

We are assuming $A\vect{x}=B\vect{x}$ for all $\vect{x}\in\complex{n}$, so we can employ this equality for any choice of the vector $\vect{x}$. However, we'll limit our use of this equality to the standard unit vectors, $\vect{e}_j$, $1\leq j\leq n$ (). For all $1\leq j\leq n$, $1\leq i\leq m$, 0\matrixentry{A}{i1}+ \cdots+ 0\matrixentry{A}{i,j-1}+ 1\matrixentry{A}{ij}+ 0\matrixentry{A}{i,j+1}+ \cdots+ 0\matrixentry{A}{in} \text{}\\ \matrixentry{A}{i1}\vectorentry{\vect{e}_j}{1}+ \matrixentry{A}{i2}\vectorentry{\vect{e}_j}{2}+ \matrixentry{A}{i3}\vectorentry{\vect{e}_j}{3}+ \cdots+ \matrixentry{A}{in}\vectorentry{\vect{e}_j}{n} \text{}\\ \text{}\\ \text{}\\ \matrixentry{B}{i1}\vectorentry{\vect{e}_j}{1}+ \matrixentry{B}{i2}\vectorentry{\vect{e}_j}{2}+ \matrixentry{B}{i3}\vectorentry{\vect{e}_j}{3}+ \cdots+ \text{}\\ 0\matrixentry{B}{i1}+ \cdots+ 0\matrixentry{B}{i,j-1}+ 1\matrixentry{B}{ij}+ 0\matrixentry{B}{i,j+1}+ \cdots+ 0\matrixentry{B}{in} \text{}\\ \text{}

So by the matrices $A$ and $B$ are equal, as desired.

You might notice from studying the proof that the hypotheses of this theorem could be weakened ( made less restrictive). We need only suppose the equality of the matrix-vector products for just the standard unit vectors () or any other spanning set () of $\complex{n}$ (). However, in practice, when we apply this theorem the stronger hypothesis will be in effect so this version of the theorem will suffice for our purposes. (If we changed the statement of the theorem to have the less restrictive hypothesis, then we would call the theorem stronger.)

Matrix-Vector Product A matrix-vector product is very natural in Sage, and we can check the result against a linear combination of the columns. A = matrix(QQ, [[1, -3, 4, 5], [2, 3, -2, 0], [5, 6, 8, -2]]) v = vector(QQ, [2, -2, 1, 3]) A*v (27, -4, 0) sum([v[i]*A.column(i) for i in range(len(v))]) (27, -4, 0) Notice that when a matrix is square, a vector of the correct size can be used in Sage in a product with a matrix by placing the vector on either side of the matrix. However, the two results are not the same, and we will not have ocassion to place the vector on the left any time soon. So, despite the possibility, be certain to keep your vectors on the right side of a matrix in a product. B = matrix(QQ, [[ 1, -3, 4, 5], [ 2, 3, -2, 0], [ 5, 6, 8, -2], [-4, 1, 1, 2]]) w = vector(QQ, [1, 2, -3, 2]) B*w (-7, 14, -11, -1) w*B (-18, -13, -22, 15) B*w == w*B False Since a matrix-vector product forms a linear combination of columns of a matrix, it is now very easy to check if a vector is a solution to a system of equations. This is basically the substance of . Here we construct a system of equations and construct two solutions and one non-solution by applying . Then we use a matrix-vector product to verify that the vectors are, or are not, solutions. coeff = matrix(QQ, [[-1, 3, -1, -1, 0, 2], [ 2, -6, 1, -2, -5, -8], [ 1, -3, 2, 5, 4, 1], [ 2, -6, 2, 2, 1, -3]]) const = vector(QQ, [13, -25, -17, -23]) solution1 = coeff.solve_right(const) coeff*solution1 (13, -25, -17, -23) nsp = coeff.right_kernel(basis='pivot') nsp Vector space of degree 6 and dimension 3 over Rational Field User basis matrix: [ 3 1 0 0 0 0] [ 3 0 -4 1 0 0] [ 1 0 1 0 -1 1] nspb = nsp.basis() solution2 = solution1 + 5*nspb[0]+(-4)*nspb[1]+2*nspb[2] coeff*solution2 (13, -25, -17, -23) nonnullspace = vector(QQ, [5, 0, 0, 0, 0, 0]) nonnullspace in nsp False nonsolution = solution1 + nonnullspace coeff*nonsolution (8, -15, -12, -13) We can now explain the difference between left and right variants of various Sage commands for linear algebra. Generally, the direction refers to where the vector is placed in a matrix-vector product. We place a vector on the right and understand this to mean a linear combination of the columns of the matrix. Placing a vector to the left of a matrix can be understood, in a manner totally consistent with our upcoming definition of matrix multiplication, as a linear combination of the rows of the matrix.

So the difference between A.solve_right(v) and A.solve_left(v) is that the former asks for a vector x such that A*x == v, while the latter asks for a vector x such that x*A == v. Given Sage's preference for rows, a direction-neutral version of a command, if it exists, will be the left version. For example, there is a .right_kernel() matrix method, while the .left_kernel() and .kernel() methods are identical the names are synonyms for the exact same routine.

So when you see a Sage command that comes in left and right variants figure out just what part of the defined object involves a matrix-vector product and form an interpretation from that.
Matrix Multiplication

We now define how to multiply two matrices together. Stop for a minute and think about how you might define this new operation.

Many books would present this definition much earlier in the course. However, we have taken great care to delay it as long as possible and to present as many ideas as practical based mostly on the notion of linear combinations. Towards the conclusion of the course, or when you perhaps take a second course in linear algebra, you may be in a position to appreciate the reasons for this. For now, understand that matrix multiplication is a central definition and perhaps you will appreciate its importance more by having saved it for later.

Matrix Multiplication

Suppose $A$ is an $m\times n$ matrix and $\vectorlist{B}{p}$ are the columns of an $n\times p$ matrix $B$. Then the matrix product of $A$ with $B$ is the $m\times p$ matrix where column $i$ is the matrix-vector product $A\vect{B}_i$. Symbolically, AB=A\matrixcolumns{B}{p}=\left[A\vect{B}_1|A\vect{B}_2|A\vect{B}_3|\ldots|A\vect{B}_p\right].

Matrix Multiplication $AB$
Product of two matrices

Set A= \begin{bmatrix} \end{bmatrix} B= \begin{bmatrix}

Then AB= \left[ A\colvector{1\\-1\\1\\6\\1} \left\lvert A\colvector{6\\4\\1\\4\\-2}\right. \left\lvert A\colvector{2\\3\\2\\-1\\3}\right. \left\lvert A\colvector{1\\2\\3\\2\\0}\right. \right] = \begin{bmatrix} \end{bmatrix}.

Is this the definition of matrix multiplication you expected? Perhaps our previous operations for matrices caused you to think that we might multiply two matrices of the same size, entry-by-entry? Notice that our current definition uses matrices of different sizes (though the number of columns in the first must equal the number of rows in the second), and the result is of a third size. Notice too in the previous example that we cannot even consider the product $BA$, since the sizes of the two matrices in this order aren't right.

But it gets weirder than that. Many of your old ideas about multiplication won't apply to matrix multiplication, but some still will. So make no assumptions, and don't do anything until you have a theorem that says you can. Even if the sizes are right, matrix multiplication is not commutative order matters.

Matrix multiplication is not commutative

Set A= \begin{bmatrix} \end{bmatrix} B= \begin{bmatrix} \end{bmatrix}.

Then we have two square, $2\times 2$ matrices, so allows us to multiply them in either order. We find AB= \begin{bmatrix} \end{bmatrix} BA= \begin{bmatrix} \end{bmatrix} and $AB\neq BA$. Not even close. It should not be hard for you to construct other pairs of matrices that do not commute (try a couple of $3\times 3$'s). Can you find a pair of non-identical matrices that do commute?

Matrix Multiplication, Entry-by-Entry

While certain natural properties of multiplication don't hold, many more do. In the next subsection, we'll state and prove the relevant theorems. But first, we need a theorem that provides an alternate means of multiplying two matrices. In many texts, this would be given as the definition of matrix multiplication. We prefer to turn it around and have the following formula as a consequence of our definition. It will prove useful for proofs of matrix equality, where we need to examine products of matrices, entry-by-entry.

Entries of Matrix Products

Suppose $A$ is an $m\times n$ matrix and $B$ is an $n\times p$ matrix. Then for $1\leq i\leq m$, $1\leq j\leq p$, the individual entries of $AB$ are given by \matrixentry{AB}{ij} \matrixentry{A}{i1}\matrixentry{B}{1j}+ \matrixentry{A}{i2}\matrixentry{B}{2j}+ \matrixentry{A}{i3}\matrixentry{B}{3j}+ \cdots+ \matrixentry{A}{in}\matrixentry{B}{nj}\\ \sum_{k=1}^{n}\matrixentry{A}{ik}\matrixentry{B}{kj}

Let the vectors $\vectorlist{A}{n}$ denote the columns of $A$ and let the vectors $\vectorlist{B}{p}$ denote the columns of $B$. Then for $1\leq i\leq m$, $1\leq j\leq p$, \matrixentry{AB}{ij} \text{}\\ \vectorentry{\vect{B}_j}{1}\vect{A}_1+ \vectorentry{\vect{B}_j}{2}\vect{A}_2+ \cdots+ \vectorentry{\vect{B}_j}{n}\vect{A}_n \text{}\\ \vectorentry{\vectorentry{\vect{B}_j}{1}\vect{A}_1}{i}+ \vectorentry{\vectorentry{\vect{B}_j}{2}\vect{A}_2}{i}+ \cdots+ \vectorentry{\vectorentry{\vect{B}_j}{n}\vect{A}_n}{i} \text{}\\ \vectorentry{\vect{B}_j}{1}\vectorentry{\vect{A}_1}{i}+ \vectorentry{\vect{B}_j}{2}\vectorentry{\vect{A}_2}{i}+ \cdots+ \vectorentry{\vect{B}_j}{n}\vectorentry{\vect{A}_n}{i} \text{}\\ \matrixentry{B}{1j}\matrixentry{A}{i1}+ \matrixentry{B}{2j}\matrixentry{A}{i2}+ \cdots+ \matrixentry{B}{nj}\matrixentry{A}{in} \text{}\\ \matrixentry{A}{i1}\matrixentry{B}{1j}+ \matrixentry{A}{i2}\matrixentry{B}{2j}+ \cdots+ \matrixentry{A}{in}\matrixentry{B}{nj} \text{}\\

Product of two matrices, entry-by-entry

Consider again the two matrices from A= \begin{bmatrix} \end{bmatrix} B= \begin{bmatrix}

Then suppose we just wanted the entry of $AB$ in the second row, third column: \matrixentry{AB}{23} \matrixentry{A}{21}\matrixentry{B}{13}+ \matrixentry{A}{22}\matrixentry{B}{23}+ \matrixentry{A}{23}\matrixentry{B}{33}+ \matrixentry{A}{24}\matrixentry{B}{43}+ \matrixentry{A}{25}\matrixentry{B}{53}\\

Notice how there are 5 terms in the sum, since 5 is the common dimension of the two matrices (column count for $A$, row count for $B$). In the conclusion of , it would be the index $k$ that would run from 1 to 5 in this computation. Here's a bit more practice.

The entry of third row, first column: \matrixentry{AB}{31} \matrixentry{A}{31}\matrixentry{B}{11}+ \matrixentry{A}{32}\matrixentry{B}{21}+ \matrixentry{A}{33}\matrixentry{B}{31}+ \matrixentry{A}{34}\matrixentry{B}{41}+ \matrixentry{A}{35}\matrixentry{B}{51}\\

To get some more practice on your own, complete the computation of the other 10 entries of this product. Construct some other pairs of matrices (of compatible sizes) and compute their product two ways. First use . Since linear combinations are straightforward for you now, this should be easy to do and to do correctly. Then do it again, using . Since this process may take some practice, use your first computation to check your work.

is the way many people compute matrix products by hand. It will also be very useful for the theorems we are going to prove shortly. However, the definition () is frequently the most useful for its connections with deeper ideas like the null space and the upcoming column space.

Matrix Multiplication Matrix multiplication is very natural in Sage, and is just as easy as multiplying two numbers. We illustrate by using it to compute the entry in the first row and third column. A = matrix(QQ, [[3, -1, 2, 5], [9, 1, 2, -4]]) B = matrix(QQ, [[1, 6, 1], [0, -1, 2], [5, 2, 3], [1, 1, 1]]) A*B [18 28 12] [15 53 13] sum([A[0,k]*B[k,2] for k in range(A.ncols())]) 12 Note in the final statement, we could replace A.ncols() by B.nrows() since these two quantities must be identical. You can experiment with the last statement by editing it to compute any of the five other entries of the matrix product.

Square matrices can be multiplied in either order, but the result will almost always be different. Execute repeatedly the following products of two random $4\times 4$ matrices, with a check on the equality of the two products in either order. It is possible, but highly unlikely, that the two products will be equal. So if this compute cell ever produces True it will be a minor miracle. A = random_matrix(QQ,4,4) B = random_matrix(QQ,4,4) A*B == B*A # random, sort of False
Properties of Matrix Multiplication

In this subsection, we collect properties of matrix multiplication and its interaction with the zero matrix (), the identity matrix (), matrix addition (), scalar matrix multiplication (), the inner product (), conjugation (), and the transpose (). Whew! Here we go. These are great proofs to practice with, so try to concoct the proofs before reading them, they'll get progressively more complicated as we go.

Matrix Multiplication and the Zero Matrix

Suppose $A$ is an $m\times n$ matrix. Then

1. $A\zeromatrix_{n\times p}=\zeromatrix_{m\times p}$
2. $\zeromatrix_{p\times m}A=\zeromatrix_{p\times n}$

We'll prove (1) and leave (2) to you. Entry-by-entry, for $1\leq i\leq m$, $1\leq j\leq p$, \matrixentry{A\zeromatrix_{n\times p}}{ij} \text{}\\ \text{}\\ \text{}\\ \text{}

So by the definition of matrix equality (), the matrices $A\zeromatrix_{n\times p}$ and $\zeromatrix_{m\times p}$ are equal.

Matrix Multiplication and Identity Matrix

Suppose $A$ is an $m\times n$ matrix. Then

1. $AI_n=A$
2. $I_mA=A$

Again, we'll prove (1) and leave (2) to you. Entry-by-entry, For $1\leq i\leq m$, $1\leq j\leq n$, \sum_{k=1}^{n}\matrixentry{A}{ik}\matrixentry{I_n}{kj} \text{}\\ \text{}\\ \text{}\\

So the matrices $A$ and $AI_n$ are equal, entry-by-entry, and by the definition of matrix equality () we can say they are equal matrices.

It is this theorem that gives the identity matrix its name. It is a matrix that behaves with matrix multiplication like the scalar 1 does with scalar multiplication. To multiply by the identity matrix is to have no effect on the other matrix.

Suppose $A$ is an $m\times n$ matrix and $B$ and $C$ are $n\times p$ matrices and $D$ is a $p\times s$ matrix. Then

1. $A(B+C)=AB+AC$
2. $(B+C)D=BD+CD$

We'll do (1), you do (2). Entry-by-entry, for $1\leq i\leq m$, $1\leq j\leq p$, \matrixentry{A(B+C)}{ij} \text{}\\ \text{}\\ \text{}\\ \text{}\\ \text{}\\ \text{}

So the matrices $A(B+C)$ and $AB+AC$ are equal, entry-by-entry, and by the definition of matrix equality () we can say they are equal matrices.

Matrix Multiplication and Scalar Matrix Multiplication

Suppose $A$ is an $m\times n$ matrix and $B$ is an $n\times p$ matrix. Let $\alpha$ be a scalar. Then $\alpha(AB)=(\alpha A)B=A(\alpha B)$.

These are equalities of matrices. We'll do the first one, the second is similar and will be good practice for you. For $1\leq i\leq m$, $1\leq j\leq p$, \matrixentry{\alpha(AB)}{ij} \text{}\\ \text{}\\ \text{}\\ \text{}\\ \text{}

So the matrices $\alpha(AB)$ and $(\alpha A)B$ are equal, entry-by-entry, and by the definition of matrix equality () we can say they are equal matrices.

Matrix Multiplication is Associative

Suppose $A$ is an $m\times n$ matrix, $B$ is an $n\times p$ matrix and $D$ is a $p\times s$ matrix. Then $A(BD)=(AB)D$.

A matrix equality, so we'll go entry-by-entry, no surprise there. For $1\leq i\leq m$, $1\leq j\leq s$, \matrixentry{A(BD)}{ij} \text{}\\ \text{}\\ \text{}\\ We can switch the order of the summation since these are finite sums, \text{}\\ As $\matrixentry{D}{\ell j}$ does not depend on the index $k$, we can use distributivity to move it outside of the inner sum, \text{}\\ \text{}\\ \text{}\\ \text{}

So the matrices $(AB)D$ and $A(BD)$ are equal, entry-by-entry, and by the definition of matrix equality () we can say they are equal matrices.

The statement of our next theorem is technically inaccurate. If we upgrade the vectors $\vect{u},\,\vect{v}$ to matrices with a single column, then the expression $\transpose{\conjugate{\vect{u}}}\vect{v}$ is a $1\times 1$ matrix, though we will treat this small matrix as if it was simply the scalar quantity in its lone entry. When we apply there should not be any confusion. Notice that if we treat a column vector as a matrix with a single column, then we can also construct the adjoint of a vector, though we will not make this a common practice.

Matrix Multiplication and Inner Products

If we consider the vectors $\vect{u},\,\vect{v}\in\complex{m}$ as $m\times 1$ matrices then \innerproduct{\vect{u}}{\vect{v}}

\innerproduct{\vect{u}}{\vect{v}} \text{}\\ \text{}\\ \text{}\\ \text{}\\

To finish we just blur the distinction between a $1\times 1$ matrix ($\transpose{\conjugate{\vect{u}}}\vect{v}$) and its lone entry.

Matrix Multiplication and Complex Conjugation

Suppose $A$ is an $m\times n$ matrix and $B$ is an $n\times p$ matrix. Then $\conjugate{AB}=\conjugate{A}\,\conjugate{B}$.

To obtain this matrix equality, we will work entry-by-entry. For $1\leq i\leq m$, $1\leq j\leq p$, \matrixentry{\conjugate{AB}}{ij} \text{}\\ \text{}\\ \text{}\\ \text{}\\ \text{}\\ \text{}

So the matrices $\conjugate{AB}$ and $\conjugate{A}\,\conjugate{B}$ are equal, entry-by-entry, and by the definition of matrix equality () we can say they are equal matrices.

Another theorem in this style, and it's a good one. If you've been practicing with the previous proofs you should be able to do this one yourself.

Matrix Multiplication and Transposes

Suppose $A$ is an $m\times n$ matrix and $B$ is an $n\times p$ matrix. Then $\transpose{(AB)}=\transpose{B}\transpose{A}$.

This theorem may be surprising but if we check the sizes of the matrices involved, then maybe it will not seem so far-fetched. First, $AB$ has size $m\times p$, so its transpose has size $p\times m$. The product of $\transpose{B}$ with $\transpose{A}$ is a $p\times n$ matrix times an $n\times m$ matrix, also resulting in a $p\times m$ matrix. So at least our objects are compatible for equality (and would not be, in general, if we didn't reverse the order of the matrix multiplication).

Here we go again, entry-by-entry. For $1\leq i\leq m$, $1\leq j\leq p$, \text{}\\ \text{}\\ \text{}\\ \text{}\\ \text{}

So the matrices $\transpose{(AB)}$ and $\transpose{B}\transpose{A}$ are equal, entry-by-entry, and by the definition of matrix equality () we can say they are equal matrices.

This theorem seems odd at first glance, since we have to switch the order of $A$ and $B$. But if we simply consider the sizes of the matrices involved, we can see that the switch is necessary for this reason alone. That the individual entries of the products then come along to be equal is a bonus.

As the adjoint of a matrix is a composition of a conjugate and a transpose, its interaction with matrix multiplication is similar to that of a transpose. Here's the last of our long list of basic properties of matrix multiplication.

Suppose $A$ is an $m\times n$ matrix and $B$ is an $n\times p$ matrix. Then $\adjoint{(AB)}=\adjoint{B}\adjoint{A}$.

Notice how none of these proofs above relied on writing out huge general matrices with lots of ellipses () and trying to formulate the equalities a whole matrix at a time. This messy business is a proof technique to be avoided at all costs. Notice too how the proof of does not use an entry-by-entry approach, but simply builds on previous results about matrix multiplication's interaction with conjugation and transposes.

These theorems, along with and the other results in , give you the rules for how matrices interact with the various operations we have defined on matrices (addition, scalar multiplication, matrix multiplication, conjugation, transposes and adjoints). Use them and use them often. But don't try to do anything with a matrix that you don't have a rule for. Together, we would informally call all these operations, and the attendant theorems, the algebra of matrices. Notice, too, that every column vector is just a $n\times 1$ matrix, so these theorems apply to column vectors also. Finally, these results, taken as a whole, may make us feel that the definition of matrix multiplication is not so unnatural.

Properties of Matrix Multiplication As before, we can use Sage to demonstrate theorems. With randomly-generated matrices, these verifications might be even more believable. Some of the above results should feel fairly routine, but some are perhaps contrary to intuition. For example, might at first glance seem surprising due to the requirement that the order of the product is reversed. Here is how we would investigate this theorem in Sage. The following compute cell should always return True. Repeated experimental evidence does not make a proof, but certainly gives us confidence. A = random_matrix(QQ, 3, 7) B = random_matrix(QQ, 7, 5) (A*B).transpose() == B.transpose()*A.transpose() True By now, you can probably guess the matrix method for checking if a matrix is Hermitian. A = matrix(QQbar, [[ 45, -5-12*I, -1-15*I, -56-8*I], [-5+12*I, 42, 32*I, -14-8*I], [-1+15*I, -32*I, 57, 12+I], [-56+8*I, -14+8*I, 12-I, 93]]) A.is_hermitian() True We can illustrate the most fundamental property of a Hermitian matrix. The vectors x and y below are random, but according to the final command should produce True for any possible values of these two vectors. (You would be right to think that using random vectors over QQbar would be a better idea, but at this writing, these vectors are not as random as one would like, and are insufficient to perform an accurate test here.) x = random_vector(QQ, 4) + QQbar(I)*random_vector(QQ, 4) y = random_vector(QQ, 4) + QQbar(I)*random_vector(QQ, 4) (A*x).hermitian_inner_product(y) == x.hermitian_inner_product(A*y) True
Hermitian Matrices

The adjoint of a matrix has a basic property when employed in a matrix-vector product as part of an inner product. At this point, you could even use the following result as a motivation for the definition of an adjoint.

Suppose that $A$ is an $m\times n$ matrix and $\vect{x}\in\complex{n}$, $\vect{y}\in\complex{m}$. Then $\innerproduct{A\vect{x}}{\vect{y}}=\innerproduct{\vect{x}}{\adjoint{A}\vect{y}}$.

\innerproduct{A\vect{x}}{\vect{y}} \text{}\\ \text{}\\ \text{}\\ \text{}\\ \text{}

Sometimes a matrix is equal to its adjoint (), and these matrices have interesting properties. One of the most common situations where this occurs is when a matrix has only real number entries. Then we are simply talking about symmetric matrices (), so you can view this as a generalization of a symmetric matrix.

Hermitian Matrix

The square matrix $A$ is Hermitian (or self-adjoint) if $A=\adjoint{A}$.

Again, the set of real matrices that are Hermitian is exactly the set of symmetric matrices. In we will uncover some amazing properties of Hermitian matrices, so when you get there, run back here to remind yourself of this definition. Further properties will also appear in . Right now we prove a fundamental result about Hermitian matrices, matrix vector products and inner products. As a characterization, this could be employed as a definition of a Hermitian matrix and some authors take this approach.

Hermitian Matrices and Inner Products

Suppose that $A$ is a square matrix of size $n$. Then $A$ is Hermitian if and only if $\innerproduct{A\vect{x}}{\vect{y}}=\innerproduct{\vect{x}}{A\vect{y}}$ for all $\vect{x},\,\vect{y}\in\complex{n}$.

\quad This is the easy half of the proof, and makes the rationale for a definition of Hermitian matrices most obvious. Assume $A$ is Hermitian, \innerproduct{A\vect{x}}{\vect{y}} \text{}\\ \text{}\\

\quad This half will take a bit more work. Assume that $\innerproduct{A\vect{x}}{\vect{y}}=\innerproduct{\vect{x}}{A\vect{y}}$ for all $\vect{x},\,\vect{y}\in\complex{n}$. Choose any $\vect{x}\in\complex{n}$. We want to show that $A=\adjoint{A}$ by establishing that $A\vect{x}=\adjoint{A}\vect{x}$. With only this much motivation, consider the inner product, \innerproduct{A\vect{x}-\adjoint{A}\vect{x}}{A\vect{x}-\adjoint{A}\vect{x}} \innerproduct{A\vect{x}-\adjoint{A}\vect{x}}{A\vect{x}}- \innerproduct{A\vect{x}-\adjoint{A}\vect{x}}{\adjoint{A}\vect{x}} \text{}\\ \innerproduct{A\vect{x}-\adjoint{A}\vect{x}}{A\vect{x}}- \innerproduct{A\left(A\vect{x}-\adjoint{A}\vect{x}\right)}{\vect{x}} \text{}\\ \innerproduct{A\vect{x}-\adjoint{A}\vect{x}}{A\vect{x}}- \innerproduct{A\vect{x}-\adjoint{A}\vect{x}}{A\vect{x}} =0 \text{}

Because this first inner product equals zero, and has the same vector in each argument ($A\vect{x}-\adjoint{A}\vect{x}$), gives the conclusion that $A\vect{x}-\adjoint{A}\vect{x}=\zerovector$. With $A\vect{x}=\adjoint{A}\vect{x}$ for all $\vect{x}\in\complex{n}$, says $A=\adjoint{A}$, which is the defining property of a Hermitian matrix ().

So, informally, Hermitian matrices are those that can be tossed around from one side of an inner product to the other with reckless abandon. We'll see later what this buys us.

1. Form the matrix vector product of \begin{bmatrix} \end{bmatrix} \colvector{2\\-3\\0\\5}
2. Multiply together the two matrices below (in the order given). \begin{bmatrix} \end{bmatrix} \begin{bmatrix} \end{bmatrix}
3. Rewrite the system of linear equations below as a vector equality and using a matrix-vector product. (This question does not ask for a solution to the system. But it does ask you to express the system of equations in a new form using tools from this section.)
Compute the product of the two matrices below, $AB$. Do this using the definitions of the matrix-vector product () and the definition of matrix multiplication (). A= \begin{bmatrix} \end{bmatrix} B=\begin{bmatrix} \end{bmatrix} By , \left[ \left. \begin{bmatrix} \end{bmatrix} \colvector{1\\2} \right\vert\ \left. \begin{bmatrix} \end{bmatrix} \colvector{5\\0} \right\vert\ \left. \begin{bmatrix} \end{bmatrix} \colvector{-3\\2} \right\vert\ \left. \begin{bmatrix} \end{bmatrix} \colvector{4\\-2} \right. \right] Repeated applications of give \left[ \left.1\colvector{2\\-1\\2}+2\colvector{5\\3\\-2}\right\vert\ \left.5\colvector{2\\-1\\2}+0\colvector{5\\3\\-2}\right\vert\ \left.-3\colvector{2\\-1\\2}+2\colvector{5\\3\\-2}\right\vert\ \left.4\colvector{2\\-1\\2}+(-3)\colvector{5\\3\\-2}\right. \right]\\ \begin{bmatrix} \end{bmatrix} Compute the product $AB$ of the two matrices below using both the definition of the matrix-vector product () and the definition of matrix multiplication (). A \begin{bmatrix} \end{bmatrix} B \begin{bmatrix} \end{bmatrix} Compute the product $AB$ of the two matrices below using both the definition of the matrix-vector product () and the definition of matrix multiplication (). \begin{bmatrix} \end{bmatrix} \begin{bmatrix} \end{bmatrix} Compute the product $AB$ of the two matrices below using both the definition of the matrix-vector product () and the definition of matrix multiplication (). \begin{bmatrix} \end{bmatrix} \begin{bmatrix} \end{bmatrix} Compute the product $AB$ of the two matrices below. \begin{bmatrix} \end{bmatrix} \begin{bmatrix} 3\\ 4 \\ 0 \\ 2 \end{bmatrix} $AB = \begin{bmatrix} 7\\2\\9\end{bmatrix}$. Compute the product $AB$ of the two matrices below. \begin{bmatrix} \end{bmatrix} \begin{bmatrix} -7\\ 3 \\ 1 \\ 1 \end{bmatrix} $AB = \begin{bmatrix} 0\\ 0 \\ 0 \end{bmatrix}$. Compute the product $AB$ of the two matrices below using both the definition of the matrix-vector product () and the definition of matrix multiplication (). \begin{bmatrix} \end{bmatrix} \begin{bmatrix} \end{bmatrix} For the matrix find $A^2$, $A^3$, $A^4$. Find a general formula for $A^n$ for any positive integer $n$. From this pattern, we see that For the matrix Find a general formula for $A^n$ for any positive integer $n$. From this pattern, we see that For the matrix find $A^2$, $A^3$, $A^4$. Find a general formula for $A^n$ for any positive integer $n$. The pattern emerges, and we see that For the matrix find $A^2$, $A^3$, $A^4$. Find a general formula for $A^n$ for any positive integer $n$. We quickly compute and we then see that $A^3$ and all subsequent powers of $A$ are the $3 \times 3$ zero matrix; that is, $A^n = \zeromatrix_{3,3}$ for $n\ge 3$. Suppose that $A$ is a square matrix and there is a vector, $\vect{b}$, such that $\linearsystem{A}{\vect{b}}$ has a unique solution. Prove that $A$ is nonsingular. Give a direct proof (perhaps appealing to ) rather than just negating a sentence from the text discussing a similar situation. Since $\linearsystem{A}{\vect{b}}$ has at least one solution, we can apply . Because the solution is assumed to be unique, the null space of $A$ must be trivial. Then implies that $A$ is nonsingular.

The converse of this statement is a trivial application of . That said, we could extend our NSMxx series of theorems with an added equivalence for nonsingularity, Given a single vector of constants, $\vect{b}$, the system $\linearsystem{A}{\vect{b}}$ has a unique solution.
Prove the second part of . Prove the second part of . Prove the second part of . Prove the second part of . We'll run the proof entry-by-entry. \text{}\\ \text{}\\ \text{}\\ \text{} So the matrices $\alpha(AB)$ and $A(\alpha B)$ are equal, entry-by-entry, and by the definition of matrix equality () we can say they are equal matrices. Suppose that $A$ is an $m\times n$ matrix and $\vect{x},\,\vect{y}\in\nsp{A}$. Prove that $\vect{x}+\vect{y}\in\nsp{A}$. Suppose that $A$ is an $m\times n$ matrix, $\alpha\in\complex{\null}$, and $\vect{x}\in\nsp{A}$. Prove that $\alpha\vect{x}\in\nsp{A}$. Suppose that $A$ is an $m\times n$ matrix and $B$ is an $n\times p$ matrix. Prove that the null space of $B$ is a subset of the null space of $AB$, that is $\nsp{B}\subseteq\nsp{AB}$. Provide an example where the opposite is false, in other words give an example where $\nsp{AB}\not\subseteq\nsp{B}$. To prove that one set is a subset of another, we start with an element of the smaller set and see if we can determine that it is a member of the larger set (). Suppose $\vect{x}\in\nsp{B}$. Then we know that $B\vect{x}=\zerovector$ by . Consider \text{}\\ \text{}\\ This establishes that $\vect{x}\in\nsp{AB}$, so $\nsp{B}\subseteq\nsp{AB}$.

To show that the inclusion does not hold in the opposite direction, choose $B$ to be any nonsingular matrix of size $n$. Then $\nsp{B}=\set{\zerovector}$ by . Let $A$ be the square zero matrix, $\zeromatrix$, of the same size. Then $AB=\zeromatrix B=\zeromatrix$ by and therefore $\nsp{AB}=\complex{n}$, and is not a subset of $\nsp{B}=\set{\zerovector}$.
Suppose that $A$ is an $n\times n$ nonsingular matrix and $B$ is an $n\times p$ matrix. Prove that the null space of $B$ is equal to the null space of $AB$, that is $\nsp{B}=\nsp{AB}$. (Compare with .) From the solution to we know that $\nsp{B}\subseteq\nsp{AB}$. So to establish the set equality () we need to show that $\nsp{AB}\subseteq\nsp{B}$.

Suppose $\vect{x}\in\nsp{AB}$. Then we know that $AB\vect{x}=\zerovector$ by . Consider \zerovector \text{}\\ \text{} So, $B\vect{x}\in\nsp{A}$. Because $A$ is nonsingular, it has a trivial null space () and we conclude that $B\vect{x}=\zerovector$. This establishes that $\vect{x}\in\nsp{B}$, so $\nsp{AB}\subseteq\nsp{B}$ and combined with the solution to we have $\nsp{B}=\nsp{AB}$ when $A$ is nonsingular.
Suppose $\vect{u}$ and $\vect{v}$ are any two solutions of the linear system $\linearsystem{A}{\vect{b}}$. Prove that $\vect{u}-\vect{v}$ is an element of the null space of $A$, that is, $\vect{u}-\vect{v}\in\nsp{A}$. Give a new proof of replacing applications of with matrix-vector products (). We will work with the vector equality representations of the relevant systems of equations, as described by .

Suppose $\vect{y}=\vect{w}+\vect{z}$ and $\vect{z}\in\nsp{A}$. Then \text{}\\ \text{}\\ demonstrating that $\vect{y}$ is a solution.

Suppose $\vect{y}$ is a solution to $\linearsystem{A}{\vect{b}}$. Then A(\vect{y}-\vect{w}) \text{}\\ \text{}\\ which says that $\vect{y}-\vect{w}\in\nsp{A}$. In other words, $\vect{y}-\vect{w}=\vect{z}$ for some vector $\vect{z}\in\nsp{A}$. Rewritten, this is $\vect{y}=\vect{w}+\vect{z}$, as desired.
Suppose that $\vect{x},\,\vect{y}\in\complex{n}$, $\vect{b}\in\complex{m}$ and $A$ is an $m\times n$ matrix. If $\vect{x}$, $\vect{y}$ and $\vect{x}+\vect{y}$ are each a solution to the linear system $\linearsystem{A}{\vect{b}}$, what interesting can you say about $\vect{b}$? Form an implication with the existence of the three solutions as the hypothesis and an interesting statement about $\linearsystem{A}{\vect{b}}$ as the conclusion, and then give a proof. $\linearsystem{A}{\vect{b}}$ must be homogeneous. To see this consider that \vect{b} \text{}\\ \text{}\\ \text{}\\ \text{}\\ \text{}\\ \text{} By we see that $\linearsystem{A}{\vect{b}}$ is homogeneous.