(5) Let $A=\{x \mid 1 \leqslant x \leqslant 9, x \in \mathbf{Z}\}, B=\{(a, b) \mid a, b \in A\}$, define the mapping $f:(a, b) \rightarrow a b-a-b$ from $B$ to $\mathbf{Z}$, then the number of ordered pairs $(a, b)$ that satisfy $(a, b) \xrightarrow{f} 11$ is ( ).
(A) 4 pairs
(B) 6 pairs
(C) 8 pairs
(D) 12 pairs
5 Because
$$
f(a, b)=a b-a-b=11,
$$

that is
$$
(a-1)(b-1)=2 \times 6=3 \times 4=1 \times 12 .
$$

then
$$
\begin{array}{l}
\left\{\begin{array} { l } 
{ a - 1 = 2 , } \\
{ b - 1 = 6 , }
\end{array} \left\{\begin{array} { l } 
{ a - 1 = 6 , } \\
{ b - 1 = 2 , }
\end{array} \left\{\begin{array}{l}
a-1=3, \\
b-1=4,
\end{array}\right.\right.\right. \\
\left\{\begin{array} { l } 
{ a - 1 = 4 , } \\
{ b - 1 = 3 , }
\end{array} \left\{\begin{array} { l } 
{ a - 1 = 1 , } \\
{ b - 1 = 1 2 , }
\end{array} \left\{\begin{array}{l}
a-1=12, \\
b-1=1 .
\end{array}\right.\right.\right.
\end{array}
$$

Solving, we get the ordered pairs that satisfy the conditions as $(3,7),(7,3),(4,5),(5,4)$. Therefore, the answer is A.