defined matrix functions for assignment