Learning Center

The data manipulation tool was designed to help you do some everyday tasks involving matrices and vectors. It is divided into four groups: “select”, “Copy and paste”, “Generate” and “Common operations”. The list of operations is presented below:

Select Group Copy and Paste Group Generate Group Common Operations Group

Main diagonal

As is

Random (correlation matrix)


Secondary diagonal


Random (covariance matrix)


Lower triangular

Vertical (column-major order)

Ones (main diagonal)


Upper triangular

Vertical (row-major order)

Ones (secondary diagonal)


Strictly lower triangular

Horizontal (column-major order)

Ones (lower triangular)


Strictly upper triangular

Horizontal (row-major order)

Ones (upper triangular)

Solve AX=B, X=?

Alternate rows

Flip horizontally

Ones (strictly lower triangular)

Are equal?

Alternate columns

Flip vertically

Ones (strictly upper triangular)

Is positive definite?

Upper bidiagonal


Zeros (main diagonal)


Lower bidiagonal


Zeros (secondary diagonal)

Correlation (p-values)



Zeros (lower triangular)


Secondary upper bidiagonal


Zeros (upper triangular)

Simple returns

Secondary lower bidiagonal


Zeros (strictly lower triangular)

Continuously compounded returns

Secondary tridiagonal


Zeros (strictly upper triangular)









LU decomposition




QR decomposition




Cholesky decomposition




Singular value decomposition




Eigen decomposition




Principal Component Analysis

To perform an operation just select the desired item in the group “data manipulation” that is located in the General Toolbox tab. Here are some samples of usage of the data manipulation tool:

Example 1: Selecting the strictly upper diagonal of a matrix

To select the strictly upper diagonal of a matrix just select the matrix and then choose the option "Strictly upper triangular" of the "Select" group. The result will be similar to this:

Example 2: Transforming a matrix in a vector

To transform a matrix in cells A3:C5 to a vector in cells E3:E11, select the A3:C5 range and then use the "Vertical (column-major order)" in the "Copy and paste" group. Then select the cell E3 to be the vector first cell.

Example 3: Calculating the “Cholesky” decomposition of a matrix

To calculate the "Cholesky" decomposition of a matrix A, select the range of the matrix and then select the option "Cholesky decomposition" available in the "Common operations" group. Then set up the form as displayed in the picture below:

© 2016-2018 Safe Quantitative Technologies, ltd. All rights reserved.