Thursday, 14 May 2020

Matrix Utilities: LU factorisarion and Inverse of Complex Matrix

This blog post implements the LU factorisation and inverse calculation of a square matrix with complex numbers. A partial pivot method is used for the LU factorisation. The inverse matrix is calculated from the results of the LU factorisation, using backward and forward substitution.

For the (square) matrix entry, comma separated (the separation can also be a single whitespace) numbers need to be entered into the Input box, with no newline after the last line. A comma at the end of each line can be added optionally for comma separated numbers. Alternatively, you can load a CSV file into the Input box, by clicking on the Choose File button.

The precision of the results in decimal places can be specified in the text box headed "Precision (decimal places)". To perform the calculation, simply press the button labelled "Perform LU factorisation and Inverse" further down this page. Four matrices will be printed in coloured textareas: the Lower Triangular, Upper Triangular, Permutation and Inverse. In addition, the matrix size and determinant will be printed.


Precision (decimal places)






Input


Results pending...


Lower Triangular Matrix

Upper Triangular Matrix

Permutation Matrix

Inverse Matrix

Monday, 11 May 2020

Matrix Utilities: QR factorisation using Householder reflections for Real Matrix

This blog post implements the QR factorisation of a square matrix, using Householder reflections.

For the (square) matrix entry, comma separated (the separation can also be a single whitespace) numbers need to be entered into the Input box, with no newline after the last line. A comma at the end of each line can be added optionally for comma separated numbers. Alternatively, you can load a CSV file into the Input box, by clicking on the Choose File button.

The precision of the results in decimal places can be specified in the text box headed "Precision (decimal places)". To perform the calculation, simply press the button labelled "Perform QR factorisation" further down this page. Two matrices will be printed in coloured textareas: the Q matrix which is orthogonal, and the upper-triangular R matrix. In addition, intermediate values of the Q and R matrices will be displayed at the bottom.


Precision (decimal places)






Input



Q Matrix

R Matrix


Householder intermediates...



Saturday, 9 May 2020

Matrix Utilities: Cholesky Decomposition for Real Matrix

This blog post implements the Cholesky decomposition of a square matrix, as well as matrix inversion based on forward and backward substitution on the decomposition matrices. For a Cholesky decomposition to be feasible, the matrix must be positive definite and Hermitian. As the calculator here deals with matrices with only real number entries, the matrix will thus need to be symmetric (as well as positive definite).

For the (square) matrix entry, comma separated (the separation can also be a single whitespace) numbers need to be entered into the Input box, with no newline after the last line. A comma at the end of each line can be added optionally for comma separated numbers. Alternatively, you can load a CSV file into the Input box, by clicking on the Choose File button.

The precision of the results in decimal places can be specified in the text box headed "Precision (decimal places)". To perform the calculation, simply press the button labelled "Perform Cholesky decomposition" further down this page. The resulting Cholesky matrices displayed (in the pink boxes) will be the lower and upper triangular matrices. Finally, the matrix inverse will be displayed in the yellow box.


Precision (decimal places)






Input


Results pending...


Cholesky Matrix: Lower Triangular


Cholesky Matrix: Upper Triangular


Matrix Inverse

Thursday, 7 May 2020

Matrix Utilities: Binary Operators for Real Matrices

Binary operations on two matrices are implemented in this blog post. The operations include the following (two types of operations for non-commutative operations, a single for commutative ones):

  • Addition : A + B
  • Subtraction : A - B
  • Subtraction : B - A
  • Multiplication : A * B
  • Multiplication : B * A
  • Hadamard product: A .* B
  • Kronecker product: A kron B
  • Kronecker product: B kron A

For the matrix entries in Input A and Input B, comma separated (the separation can also be a single whitespace) real numbers need to be entered into the Input boxes, with no newline after the last line. A comma at the end of each line can be added optionally for comma separated numbers.

Note that it is possible to transpose the matrices in the textareas for Input A and Input B.

Alternatively, you can load a CSV file into each of the Input boxes, by clicking on the Choose File button. There is a select drop down menu which allows you to specify into which of the Input boxes (A or B) should the CSV file be loaded. The drop down menu needs to be set appropriately before clicking on the "Chose File" button. The CSV files that need to be loaded into the two boxes must have a different name, even if the contents are the same (due to a limitation of how the CSV loading is implemented).

The precision of the results in decimal places can be specified in the text box headed "Precision (decimal places)".

To perform the calculation, simply press the button labelled "Perform matrix operation" further down this page. Before clicking on this button, you need to specify which binary operation to perform with another select drop down menu. The result will be displayed in the yellow textarea.


Precision (decimal places)






Input A

Input B




A + B



Wednesday, 6 May 2020

Matrix Utilities: QR factorisation using Gram-Schmidt for Real Matrix

This blog post implements the QR factorisation of a square matrix whose entries are real numbers. The Gram-Schmidt method is used to calculate the orthogonal Q matrix.

For the (square) matrix entry, comma separated (the separation can also be a single whitespace) numbers need to be entered into the Input box, with no newline after the last line. A comma at the end of each line can be added optionally for comma separated numbers. Alternatively, you can load a CSV file into the Input box, by clicking on the Choose File button.

The precision of the results in decimal places can be specified in the text box headed "Precision (decimal places)". To perform the calculation, simply press the button labelled "Perform QR factorisation" further down this page. Two matrices will be printed in coloured textareas: the Q matrix which is orthogonal, and the upper-triangular R matrix. In addition, the matrix size and determinant will be printed.


Precision (decimal places)






Input


Results pending...


Q Matrix

R Matrix


Monday, 4 May 2020

Matrix Utilities: LU factorisation and Inverse of Real Matrix

This blog post implements the LU factorisation and inverse calculation of a square matrix for real numbers. A partial pivot method is used for the LU factorisation. The inverse matrix is calculated from the results of the LU factorisation, using backward and forward substitution.

For the (square) matrix entry, comma separated (the separation can also be a single whitespace) numbers need to be entered into the Input box, with no newline after the last line. A comma at the end of each line can be added optionally for comma separated numbers. Alternatively, you can load a CSV file into the Input box, by clicking on the Choose File button.

The precision of the results in decimal places can be specified in the text box headed "Precision (decimal places)". To perform the calculation, simply press the button labelled "Perform LU factorisation and Inverse" further down this page. Four matrices will be printed in coloured textareas: the Lower Triangular, Upper Triangular, Permutation and Inverse. In addition, the matrix size and determinant will be printed.


Precision (decimal places)






Input


Results pending...


Lower Triangular Matrix

Upper Triangular Matrix

Permutation Matrix

Inverse Matrix

Table of Probability Distributions

Below is a table listing commonly used probability distributions and their Cumulative Distribution Function (CDF). The table could come in ...