⇐ back

    Creating a matrix

    to create a matrix:

    create matrix by listing all it's elements in figure brackets and separating rows with semicolon:

    ex18

    as you can see, number of elements in rows can be different. In this case number of columns for a such matrix will be equal to the longest row's length. Missed element positions will be filled with zeros.

    using matrices in calculations:

    • a11 = A[0, 0] - indexing matrix element.
    • A1 = A[1, ] - A1 will be matrix, created from matrix A 2nd row.
    • A2 = A[ , 2] - A2 will be matrix, created from matrix A 3-rd column.

    matrix can be used in expressions without indexes. It can be multiplied by a number or by another matrix, transposed, inversed etc.

    transpose matrix:

    ex20

    inverse matrix:

    ex21

    matrix determinant can be calculated as det(A).