Traverse the matrix
for ( i = 1 ; i <= mat . size ; i ++ ) { for ( j = 1 ; j <= mat . size ; j ++ ) { if ( i >= j ) { System . out . printf ( " % d ▁ " , mat . A [ i * ( i - 1 ) / 2 + j - 1 ] ) ; } else { System . out . printf ( "0 ▁ " ) ; } } System . out . printf ( "NEW_LINE"); } }