A simple algorithm for generating positive-semidefinite matrices

  1. generate random matrix
  2. multiply it by its own transposition
  3. you have obtained a positive semi-definite matrix.

Example code (Python):

import numpy as np
matrixSize = 10 
A = np.random.rand(matrixSize, matrixSize)
B = np.dot(A, A.transpose())
print 'random positive semi-define matrix for today is', B

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)