Basic matrix functionality defined