This is not a matrix issue. The field K=GF(256) has characteristic 2, which result do you expect for K(3) ?