Accurate inverses and determinants of structured matrices have attracted increasing attention in the application areas of numerical linear algebra. \({{ SDD}}_k\) matrices were introduced by Wang and Wang (AIMS Math 8:24999–25016, 2023). In this paper, a parametrization of an \({ SDD}_k\) Z-matrix is investigated. Then the inverse and determinant of an \({ SDD}_k\) Z-matrix are computed to high relative accuracy under a weak assumption. \({ B}_k\) -matrices that extends \({ B}_1\) -matrices are introduced and its determinants are also computed to high relative accuracy by using its parametrization. Numerical experiment indicates the accuracy of the inverse and determinant for the matrices.