Math Higher Mathematics   Solving tasks and exercises - OnLine
Language : Russian

To perform the matrix multiplication...

# Matrix multiplication

For many reasons, doing the matrix multiplication is better in this way: The composition of the matrix A sized (m x n) by the matrix B sized (n x r) is the matrix C = AB sized (m x r), whose element cij located at the ijcell is equal to the sum of compositions of the elements of the i-th line of the matrix A by corresponding elements of the j--th column of the matrix B,i.e. Multiplication of A by B is possible (composition of AB can exist) if the number of the columns A equals the number of the lines B (in this case this two matrices are consistent by form). Example:
 2 0 3 1 5 1 2 0 0 0 4 1
x
 1 3 2 1 4 0 3 5
=
 2*1+0*2+3*4+1*3 2*3+0*1+3*0+1*5 5*1+1*2+2*4+0*3 5*3+1*1+2*0+0*5 0*1+0*2+4*4+1*3 0*3+0*1+4*0+1*5
=
 17 11 15 16 19 5
There can be a composition АВ sized (m х m), as well as composition ВА sized (m х m), for matrices А(m х n) and В(n х m). It's clear that if m is different from n these compositions can't be equal because of different resulting matrices. But even if m = n, i.e. in case of square matrices of equal order, compositions strong>АВ and ВА won't be necessary equal. For example, for matrices

A =
 -1 2 0 4
;   B =
 3 1 2 3
;
we've got:
AB =
 1 5 8 12
;  BA =
 -3 10 -2 16
;
Therefore, the matrix multiplication does not obey the commutative law (АВ uneven ВА)), if АВ = ВА, then the matrices A and B are commute.

Associative and distributive laws of matrix multiplication aretrue in all cases where the dimensions of the matrix allows next steps:
(АВ)С = А(ВС) = ABC   (associativity),
А(В + С) = АВ + АС      (distributivity of multiplication to the left of addition process)
(А + В)С = АС + ВС     (distributivity of multiplication to the right of addition process).

Multiplication of the (m x n)-matrix А by the identity matrix of m-th order to the left and by the identity matrix of n-th order to the right does not change the matrix, i.e. ЕmА = АЕn = A.

If at least one of the matrices of the composition АВ is zero, the result will be a zero matrix. Note that if АВ = 0 it doesn't mean that А = 0 или В = 0. This can be seen in the following example:
 4 1 2 0.5
x
 1 -2 -4 8
=
 0 0 0 0

To execute matrix multiplication...
To the list of possible tasks...