Ta có: \(ab+12=a+b\)
\(\Leftrightarrow a\left(b-1\right)-\left(b-1\right)+11=0\)
\(\Leftrightarrow\left(b-1\right)\left(a-1\right)=-11\)
Vì \(a,b\in Z\) nên \(\left(a-1\right),\left(b-1\right)\inƯ\left(-11\right)=\left\{\pm1,\pm11\right\}\)
Ta có bảng sau:
a-1 | 1 | -1 | 11 | -11 |
b-1 | -11 | 11 | -1 | 1 |
a | 2 | 0 | 12 | -10 |
b | -10 | 12 | 0 | 2 |
Vậy \(\left(a,b\right)\in\left\{\left(2;-10\right),\left(0;12\right),\left(12;0\right),\left(-10;2\right)\right\}\)