completed matrix functions