7.2 Matrices Multiplication

A={{3,5,-1},{4,0,2},{-6,-3,2}}

MatrixForm[A]

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

MatrixForm[B]

MatrixForm[A.B]

A={{4,2},{1,8}};B={{3},{5}};

MatrixForm[A]

MatrixForm[B]

MatrixForm[A.B]

{3,6,1}.{{1},{2},{4}}

A={{1},{2},{3}}

Note that {1,2,3} means a vector but {{1},{2},{3}} means a 3X1 matrix

MatrixForm[A]

B={{4,5,6}}

MatrixForm[B]

Dimensions[A]

Dimensions[B]

MatrixForm[A.B]

A={{5,-8,1},{4,0,0}}

MatrixForm[A]

MatrixForm[Transpose[A]]

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

MatrixForm[A]

MatrixForm[Transpose[A]]

A=DiagonalMatrix[{1,2,3}]

MatrixForm[A]

B=IdentityMatrix[3]

MatrixForm[B]

MatrixForm[A.B]

Addition of Matrices

A={{-4,6,3},{0,1,2}}

B={{5,-1,0},{3,1,0}}

MatrixForm[A]

MatrixForm[B]

A+B

MatrixForm[%]

A={{2.7,-1.8},{0,0.9},{9.0,-4.5}}

MatrixForm[A]

MatrixForm[-A]

MatrixForm[10/9 A]

MatrixForm[ 0 A]