Working on building matrix for problem 1.