In 2020, Cao et al. proved that any repeated-root constacyclic code is monomially equivalent to a matrix product code of simple-root constacyclic codes. In this paper, we study a family of matrix product codes with wonderful properties, which is a generalization of linear codes obtained from the \([u+v|u-v]\) -construction and \([u+v|\lambda ^{-1}u-\lambda ^{-1}v]\) -construction. Then we show that any \(\lambda \) -constacyclic code (not necessary repeated-root \(\lambda \) -constacyclic code) of length N over the finite field \(\mathbb {F}_q\) with \(\textrm{gcd}(\frac{q-1}{\textrm{ord}(\lambda )},N)\ge 2\) , where \(\textrm{ord}(\lambda )\) is the order of \(\lambda \) in the cyclic group \(\mathbb {F}^*_q=\mathbb {F}_q\backslash \{0\}\) , is a matrix product code of some constacyclic codes. It is a highly interesting question that the existence of sequences \(\{C_1,C_2,C_3,...\}\) of Euclidean (or Hermitian) self-dual codes with square-root-like minimum Hamming distances, i.e., \(C_i\) is an \([n(C_i),k(C_i),d(C_i)]_q\) -linear code such that \(\begin{aligned} \lim _{i\rightarrow +\infty }n(C_i)=+\infty \,\,\,\,\,\text {and}\,\,\,\,\,\lim _{i\rightarrow +\infty }\frac{d(C_i)}{\sqrt{n(C_i)}}>0. \end{aligned}\) Based on the \([u+v|\lambda ^{-1}u-\lambda ^{-1}v]\) -construction, we construct several families of Euclidean (or Hermitian) self-dual codes with square-root-like minimum Hamming distances by using Reed-Muller codes, projective Reed-Muller codes. And we construct some new Euclidean isodual \(\lambda \) -constacyclic codes with square-root-like minimum Hamming distances from Euclidean self-dual cyclic codes and Euclidean self-dual negacyclic codes by monomial equivalences.