  Let $\mathrm{SLAut}(\mathbb{F}_{q}^{n})$ denote the group of all semilinear
isometries on $\mathbb{F}_{q}^{n}$, where $q=p^{e}$ is a prime power.
Matrix-product (MP) codes are a class of long classical codes generated by
combining several commensurate classical codes with a defining matrix. We give
an explicit formula for calculating the dimension of the $\sigma$ hull of a MP
code. As a result, we give necessary and sufficient conditions for the MP codes
to be $\sigma$ dual-containing and $\sigma$ self-orthogonal. We prove that
$\mathrm{dim}_{\mathbb{F}_{q}}(\mathrm{Hull}_{\sigma}(\mathcal{C}))=\mathrm{dim}_{\mathbb{F}_{q}}(\mathrm{Hull}_{\sigma}(\mathcal{C}^{\bot_{\sigma}}))$.
We prove that for any integer $h$ with $\mathrm{max}\{0,k_{1}-k_{2}\}\leq h\leq
\mathrm{dim}_{\mathbb{F}_{q}}(\mathcal{C}_{1}\cap\mathcal{C}_{2}^{\bot_{\sigma}})$,
there exists a linear code $\mathcal{C}_{2,h}$ monomially equivalent to
$\mathcal{C}_{2}$ such that
$\mathrm{dim}_{\mathbb{F}_{q}}(\mathcal{C}_{1}\cap\mathcal{C}_{2,h}^{\bot_{\sigma}})=h$,
where $\mathcal{C}_{i}$ is an $[n,k_{i}]_{q}$ linear code for $i=1,2$. We show
that given an $[n,k,d]_{q}$ linear code $\mathcal{C}$, there exists a
monomially equivalent $[n,k,d]_{q}$ linear code $\mathcal{C}_{h}$, whose
$\sigma$ dual code has minimum distance $d'$, such that there exist an
$[[n,k-h,d;n-k-h]]_{q}$ EAQECC and an $[[n,n-k-h,d';k-h]]_{q}$ EAQECC for every
integer $h$ with $0\leq h\leq
\mathrm{dim}_{\mathbb{F}_{q}}(\mathrm{Hull}_{\sigma}(\mathcal{C}))$. Based on
this result, we present a general construction method for deriving EAQECCs with
flexible parameters from MP codes related to $\sigma$ hulls.
