The matrix size, noted m×n, is the number of rows, respectively the number of columns that a matrix contains. A matrix is said to be square when m=n. Matrices of example II are of size 2×3.
1. Multiplication
We have seen in the previous chapter how coefficients and variables are separated from one another, which leads to a matrix multiplying a vector. This implies this multiplication to be defined.
Let A be a matrix of size m×n and B be a matrix of size m′×n′.
AB=C is possible only if n=m′. The C matrix, the product, is of size m×n′.
The multiplication A by B is done by distributing A rows on each columns of B and by adding the products, namely (ci,j)=∑nk=0ai,kbk,j.
Example I
2. Addition
The addition of two matrices is possible only if they both have the same size. The corresponding elements are added. The subtraction is defined in a similar way.
Example II
3. Mutiplication by a scalar (number)
All elements of the matrix are multiplied by the scalar.
Example III
4. Decomposition
A matrix multiplying a column matrix can be decomposed into an addition of multiplications. This is due to the previous rules.
Example IV
Recapitulation
Multiplication
- AB=C where A a matrix of size m×n and B a matrix of size m′×n′. The multiplication is possible only if n=m′. Matrix C size is m×n′.
- AB≠AB
- Let K=T, the left multiplication by P gives PK=PT
- Let K=T, the right multiplication by P gives KP=TP
Addition
- A+B=(ai,j+bi,j)
Multiplication by a scalar
- λA=(λai,j)
Distributivity
- A(B+C)=AB+AC
Decomposition matrix multiplying a column matrix
- (v1⋯w1⋮⋯⋮vn⋯wn)(λ1⋮λn)=λ1(v1⋮vn)+⋯+λn(w1⋮wn)