How do i make calculations within my matrix?