Wrote the matrix function
Merge https://github.com/nashidhasan/ProgrammingAssignment2