add matrix from basis