Chapter 2 - Linear Systems of Equations and Matrices

Section 2.3 - Some Matrix Arithmetic

Example 2.3.1

(A={{-2,5,1,9},{3,0,-4,7}})//MatrixForm

(B={{6,-2,4,1},{-8,-1,3,5}})//MatrixForm

(A+B)//MatrixForm

(A-B)//MatrixForm

-3 A//MatrixForm

(-3 A+5 B)//MatrixForm

Example 2.3.2

A={{3,2},{-2,6}};

B={{-1,5},{-2,1}};

(A.B)//MatrixForm

(B.A)//MatrixForm

Example 2.3.3

A={{-2,5,1,9},{3,0,-4,7}};

B={{6,-8,-3},{-2,-1,6},{3,5,-9},{-7,4,1}};

B.A//MatrixForm

Example 2.3.4

A={{-2,5,1},{3,0,-4},{7,-5,-8}};

B={{6,-8,-3},{-2,-1,6},{3,5,-9}};

A.B//MatrixForm

B.A//MatrixForm

Example 2.3.5

(Id2=IdentityMatrix[2])//MatrixForm

(Id4=IdentityMatrix[4])//MatrixForm

(A={{1,3,2,4},{-1,-6,0,7},{3,-5,1,9},{0,8,2,1}})//MatrixForm

(Id4.A)//MatrixForm

(A.Id4)//MatrixForm

B=Array[(Subscript[b, ##])&,{4,4}];

(Id4.B)//MatrixForm

(B.Id4)//MatrixForm