self defined matrix - must be float