krylov matrix for gallery