Matrix Multiplication

If A is an m x n matrix and B is an n x r matrix, then the product C = AB is an m x r matrix. The (i, j) entry of the product matrix C is computed as follows:

c i j = a i 1 b 1 j + a i 2 b 2 j + + a i n b n j = k = 1 n a i k b k j

that is the row i and column j element of AB is found by adding the products formed from corresponding elements of row i in A and column j in B (first times first, second times second, and so on).

Remark. Notice that A and B need not be the same size. However, the number of columns of A must be the same as the number of rows of B.

Si effettua quindi il prodotto di righe per colonne. Ad esempio

A = ( 1 3 2 4 0 6 ) ; B = ( 0 3 2 4 3 5 1 0 0 ) ; C = A B = ( 14 12 17 6 12 8 ) ;

Anche se è definito il prodotto C = AB, in genere non risulta definito il prodotto BA, il prdotto non è in generale commutativo. Inoltre per le matrici non vale la legge di annullamento del prodotto, cioè il prodotto AB righe per collo di due matrici A e B può essere uguale alla matrice nulla senza che nè A ne B siano matrici nulle.

( 1 0 4 0 ) ( 0 0 5 6 ) = ( 0 0 0 0 )

The following are algebraic properties of Matrix Addition and Scalar Multiplication. Let A, B, and C be matrices of the same size and let λ a scalar. Then

  1. (AB) C = A (BC)

  2. (A+B) C = AC + BC

  3. A(B + C) = AB + AC

  4. (λA) B = λ (AB) = A(λB)

Identity matrix

Tra le matrici di ordine n ne esiste una di ordine n tale che per ogni altra matrice A dello stesso ordine si abbia:

A ⋅ In = In ⋅ A

tale matrice si chiama matrice identità:

I n = ( 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 )

La matrice identità è anche un esempio di matrice quadrata diagonale, ossia una matrice avente tutti i suoi componenti eccetto quelli diagonali nulli, i.e. se aij = 0 per i ≠ j.

A = ( a 11 0 0 0 0 0 a 22 0 0 0 0 0 a 23 0 0 0 0 0 0 a m n )

Powers of a matrix

One may raise a square matrix to any nonnegative integer power multiplying it by itself repeatedly in the same way as for ordinary numbers. That is,

A0 = I

A1 = A

Ak = A A ⋯ A
  k times.

Computing the kth power of a matrix needs k – 1 times the time of a single matrix multiplication, if it is done with the trivial algorithm (repeated multiplication). As this may be very time consuming, one generally prefers using exponentiation by squaring, which requires less than 2 log2 k matrix multiplications, and is therefore much more efficient.

An easy case for exponentiation is that of a diagonal matrix. Since the product of diagonal matrices amounts to simply multiplying corresponding diagonal elements together, the kth power of a diagonal matrix is obtained by raising the entries to the power k:

(a11 0 ⋯ 0; 0 a22 0 ⋯ 0; 0 0 ⋯ anm)k = (a11k 0 ⋯ 0; 0 a22k 0 ⋯ 0; 0 0 ⋯ anmk)

«Thermodynamic Systems Index Definizione limite per funzioni operanti tra spazi metrici o normati »