Matrices-Unit6.mws

MATRICES AND MATRIX OPERATIONS: Unit 6

Dr. Wlodzislaw Kostecki

The Papua New Guinea University of Technology (PNGUT)

Department of Electrical and Communication Engineering

Lae, Morobe Province

Papua New Guinea

Copyright © 2000 by Wlodzislaw Kostecki

All rights reserved

-------------------------------------------------------------------

(6) Multiplication of a multi-row multi-column matrix and a column matrix

OBJECTIVES :

To introduce this operation as a basis for solving systems of linear algebraic inhomogeneous equations using Cramer’ s rule.

To provide examples of multiplication of a multi-row multi-column matrix and a column matrix.

> restart : with(linalg, multiply) :

According to the multiplication conformability rule, the product of a rectangular matrix of order ( m × n ) and an ( m × 1 ) column matrix is possible only if the number of columns in the ( m × n ) matrix is equal to the number of rows in the ( m × 1 ) column matrix , i.e. n = m . The product matrix is an ( m × 1 ) column matrix .

For example, consider a ( 3 × 4 ) matrix [ A ] given as

> A := matrix(3, 4, [a[11], a[12], a[13], a[14], a[21], a[22], a[23], a[24], a[31], a[32], a[33], a[34]]) : A = matrix(A) ;

A = matrix([[a[11], a[12], a[13], a[14]], [a[21], a...

and a ( 4 × 1 ) column matrix [ CM ] given as

> CM := matrix(4, 1, [cm[11], cm[21], cm[31], cm[41]]) : CM = matrix(CM) ;

CM = matrix([[cm[11]], [cm[21]], [cm[31]], [cm[41]]...

The product [ A ] [ CM ] is the following ( 3 × 1) column matrix:

> `A CM` := multiply(A, CM) : A*CM = matrix(`A CM`) ;

A*CM = matrix([[a[11]*cm[11]+a[12]*cm[21]+a[13]*cm[...

This matrix multiplication may be displayed in "like-in-a-book" form, namely

> matrix(A) * matrix(CM) = matrix(`A CM`) ;

matrix([[a[11], a[12], a[13], a[14]], [a[21], a[22]...

Numerical example for this type of matrix multiplication

Let a ( 3 × 4 ) matrix [ A ] and a ( 4 × 1 ) column matrix [ CM ] be given as

> A := matrix(3, 4, [1, 2, 1, 0, 0, 1, 1, 3, 1, 2, 1, 4]) : CM := matrix(4, 1, [2, 1, 0, -1]) :

> A = matrix(A) ; CM = matrix(CM) ;

A = matrix([[1, 2, 1, 0], [0, 1, 1, 3], [1, 2, 1, 4...

CM = matrix([[2], [1], [0], [-1]])

The product [ A ] [ CM ] is the following ( 3 × 1) column matrix:

> `A CM` := multiply(A, CM) : A*CM = matrix(`A CM`) ;

A*CM = matrix([[4], [-2], [0]])

or, in "like-in-a-book" form,

> matrix(A) * matrix(CM) = matrix(`A CM`) ;

matrix([[1, 2, 1, 0], [0, 1, 1, 3], [1, 2, 1, 4]])*...

* * *

N.B. This specific type of matrix multiplication finds application in solving systems of linear algebraic inhomogeneous equations.

[ For solving systems of linear algebraic inhomogeneous equations, refer to Unit (19). ]

* * *

Proceed to Unit (7) for " Special types of matrices ".

-------------------------------------------------------------------