How do i create this kind of matrix?