The real matrix

Parent Previous Next

This object is characterized by the number of rows, the number of columns and the real terms of each cell.


A real matrix can be defined :


By giving a formula to each term of the matrix.


By providing a formula of a two variable function of variable (i, j) where i is the row index and j the column index (starting from 1)


For instance, the formula if(i=j, 1, 0) will provide an identity matrix.


By a matrix calculation :


If, for instance,A is an invertible matrix of dimensions 3x3 and B is a 3x2 matrix, the matrix calculation defined by the formula A^(-1)*B will return a 3x2 matrix (A^(-1) returning the inverse of matrix A).


But a matrix calculation defined by the formula B*A won't exist (invalid matrix product).


By defining a matrix with random integer values :


Such a matrix is defined through the number of rows, number of lines, a minimal and a maximum values (integer).


The minimum value must be inferior to the maximum value.


When such a matrix is updated, all the cell of the matrix will be given distinct integer values ranging form min value to max value. If the difference between max and min value is not big enough, there will be repetitions (the lines being filled first)