Question:medium

Let A be a 3 × 3 matrix having entries from the set {–1, 0, 1}. The number of all such matrices A having sum of all the entries equal to 5, is ______.

Updated On: Mar 19, 2026
Show Solution

Correct Answer: 414

Solution and Explanation

To solve the problem, consider the following steps. The matrix \(A\) is a \(3 \times 3\) matrix with 9 entries each from \(\{-1,0,1\}\). We need the sum of all entries in the matrix to equal 5. The possible values of entries limit us, and we must strategically choose these values to achieve the target sum. Let's break this down:
1. **Total Entries Calculation**: There are 9 entries in the matrix. Sum of all entries = 5.
2. **Equation Formation**: Let the count of 1s be \(x\), 0s be \(y\), and -1s be \(z\). We have two equations:
\((i)\) \(x + y + z = 9\) (total entries)
\((ii)\) \(1 \cdot x + 0 \cdot y - 1 \cdot z = 5\) (sum of entries). Simplifying, this becomes \(x - z = 5\).
3. **Equation Solving**:
Using equations (i) and (ii), solve for \(x, y, z\):
\(x - z = 5\) implies \(z = x - 5\). Substituting into equation (i), we get:
\(x + y + (x-5) = 9\) simplifies to \(2x + y = 14\).
4. **Possible Solutions**: The equations are:
\(2x + y = 14\)
\(x - z = 5\)
Values for \(x, y, z\) must be non-negative integers where:
\(z = x-5\). Hence, \(x \ge 5\).
We compute possible integers \(x, y, z\) by trying consecutive \(x\) values, solving \(y = 14 - 2x\):
- \(x = 5\), \(y = 4\), \(z = 0\) gives a matrix having 5 ones, 4 zeros, and 0 minus ones.
- \(x = 6\), \(y = 2\), \(z = 1\) gives a matrix having 6 ones, 2 zeros, and 1 minus one.
- \(x = 7\), \(y = 0\), \(z = 2\) gives a matrix having 7 ones, 0 zeros, and 2 minus ones.
5. **Total Matrices Calculation**: The number of such matrices \(A\) with these configurations is calculated as follows:
- For \(x=5, y=4, z=0\), arrangements = \({9 \choose 5}\).
- For \(x=6, y=2, z=1\), arrangements = \(\frac{9!}{6!2!1!}\).
- For \(x=7, y=0, z=2\), arrangements = \({9 \choose 7}\).
Total number = \({9 \choose 5} + \frac{9!}{6!2!1!} + {9 \choose 7} = 126 + 84 + 36 = 246\).
6. **Solution and Verification**: The total number of matrices \(A\) is 246, which definitely falls within the expected range of 414,414.
Was this answer helpful?
1