Engineering Mathematics

Find \(|a-b|\)

Question

The matrix

\[ A= \begin{bmatrix} a & 0 & 3 & 7\\ 2 & 5 & 1 & 3\\ 0 & 0 & 2 & 4\\ 0 & 0 & 0 & b \end{bmatrix} \]

has

\[ \det(A)=100 \]

and

\[ \operatorname{trace}(A)=14 \]

The value of \(|a-b|\) is:

A. \(1\)

B. \(2\)

C. \(3\)

D. \(4\)

Given

\[ A= \begin{bmatrix} a & 0 & 3 & 7\\ 2 & 5 & 1 & 3\\ 0 & 0 & 2 & 4\\ 0 & 0 & 0 & b \end{bmatrix} \]

We are given:

\[ \boxed{\det(A)=100} \] \[ \boxed{\operatorname{tr}(A)=14} \]

We need to find:

\[ \boxed{|a-b|} \]

Concepts Used

1. Trace of a matrix

The trace of a square matrix is the sum of its diagonal elements.

\[ \boxed{ \operatorname{tr}(A) = \sum_{i=1}^{n}a_{ii} } \]

2. Determinant of a triangular matrix

For an upper triangular or lower triangular matrix, the determinant is equal to the product of the diagonal elements.

\[ \boxed{ \det(A) = \prod_{i=1}^{n}a_{ii} } \]

3. Determinant of a block triangular matrix

If a matrix has the form

\[ A= \begin{bmatrix} P & Q\\ 0 & R \end{bmatrix} \]

then

\[ \boxed{ \det(A)=\det(P)\det(R) } \]

4. Important identity

For two numbers \(a\) and \(b\),

\[ \boxed{ (a-b)^2=(a+b)^2-4ab } \]

Solution

Step 1: Use the trace condition

We have

\[ A= \begin{bmatrix} a & 0 & 3 & 7\\ 2 & 5 & 1 & 3\\ 0 & 0 & 2 & 4\\ 0 & 0 & 0 & b \end{bmatrix} \]

The diagonal elements are:

\[ a,\quad5,\quad2,\quad b \]

Therefore, using the definition of trace:

\[ \operatorname{tr}(A) = a+5+2+b \]

Given:

\[ \operatorname{tr}(A)=14 \]

Hence,

\[ a+5+2+b=14 \] \[ a+b+7=14 \] \[ \boxed{a+b=7} \]

Step 2: Observe the structure of the matrix

The matrix is

\[ A= \begin{bmatrix} a & 0 & 3 & 7\\ 2 & 5 & 1 & 3\\ 0 & 0 & 2 & 4\\ 0 & 0 & 0 & b \end{bmatrix} \]

Notice that the lower-left \(2\times2\) block consists entirely of zeros.

\[ A= \begin{bmatrix} \boxed{ \begin{matrix} a & 0\\ 2 & 5 \end{matrix} } & \boxed{ \begin{matrix} 3 & 7\\ 1 & 3 \end{matrix} } \\[8pt] \boxed{ \begin{matrix} 0 & 0\\ 0 & 0 \end{matrix} } & \boxed{ \begin{matrix} 2 & 4\\ 0 & b \end{matrix} } \end{bmatrix} \]

Therefore, \(A\) is a block upper triangular matrix.

Hence we can use:

\[ \boxed{ \det(A)=\det(P)\det(R) } \]

Step 3: Calculate the determinant

The first diagonal block is

\[ P= \begin{bmatrix} a & 0\\ 2 & 5 \end{bmatrix} \]

Its determinant is:

\[ \det(P) = (a)(5)-(0)(2) \] \[ \boxed{ \det(P)=5a } \]

The second diagonal block is

\[ R= \begin{bmatrix} 2 & 4\\ 0 & b \end{bmatrix} \]

Therefore,

\[ \det(R) = (2)(b)-(4)(0) \] \[ \boxed{ \det(R)=2b } \]

Hence,

\[ \det(A) = \det(P)\det(R) \] \[ =(5a)(2b) \] \[ \boxed{ \det(A)=10ab } \]

Step 4: Use the determinant condition

We are given:

\[ \det(A)=100 \]

But we have found:

\[ \det(A)=10ab \]

Therefore,

\[ 10ab=100 \]

Dividing both sides by \(10\):

\[ \boxed{ab=10} \]

Step 5: We now have two equations

From the trace:

\[ \boxed{a+b=7} \]

From the determinant:

\[ \boxed{ab=10} \]

We need \(|a-b|\), so we do not actually need to find \(a\) and \(b\) individually.

Step 6: Use the identity for \((a-b)^2\)

Start with:

\[ (a-b)^2 = a^2-2ab+b^2 \]

We know that:

\[ (a+b)^2 = a^2+2ab+b^2 \]

Therefore,

\[ (a-b)^2 = (a+b)^2-4ab \]

Now substitute:

\[ a+b=7 \] \[ ab=10 \]

Hence,

\[ (a-b)^2 = 7^2-4(10) \] \[ =49-40 \] \[ =9 \]

Taking the positive square root:

\[ |a-b| = \sqrt{9} \] \[ \boxed{|a-b|=3} \]

Alternative Method: Find \(a\) and \(b\)

We already know:

\[ a+b=7 \] \[ ab=10 \]

Therefore, \(a\) and \(b\) are the roots of:

\[ x^2-(a+b)x+ab=0 \]

Substituting the values:

\[ x^2-7x+10=0 \]

Factorizing:

\[ (x-5)(x-2)=0 \]

Therefore,

\[ x=5 \quad\text{or}\quad x=2 \]

Hence \(a\) and \(b\) are \(5\) and \(2\) in either order.

\[ |a-b| = |5-2| = \boxed{3} \]

Step 7: Match with the options

We obtained:

\[ \boxed{|a-b|=3} \]

Therefore:

\[ \boxed{\text{Option C}} \]

Final Answer

\[ \boxed{|a-b|=3} \]

Correct option: C

Formulas & Concepts to Remember

1. Trace

\[ \boxed{ \operatorname{tr}(A) = \sum_{i=1}^{n}a_{ii} } \]

2. \(2\times2\) determinant

\[ \boxed{ \begin{vmatrix} a & b\\ c & d \end{vmatrix} = ad-bc } \]

3. Block triangular determinant

\[ \boxed{ \det \begin{bmatrix} P & Q\\ 0 & R \end{bmatrix} = \det(P)\det(R) } \]

4. Sum and product of roots

If \(a\) and \(b\) are roots of

\[ x^2-Sx+P=0 \]

then:

\[ \boxed{a+b=S} \] \[ \boxed{ab=P} \]

5. Difference identity

\[ \boxed{ (a-b)^2=(a+b)^2-4ab } \]

GATE Tip

This question is designed to look like a \(4\times4\) determinant problem, but calculating the determinant by expansion is unnecessary.

The matrix has a block upper triangular structure:

\[ \det(A)=10ab \]

The trace immediately gives:

\[ a+b=7 \]

The determinant gives:

\[ ab=10 \]

Since the question asks for \(|a-b|\), the fastest route is:

\[ (a-b)^2 = (a+b)^2-4ab \] \[ = 7^2-4(10) \] \[ =9 \] \[ \boxed{|a-b|=3} \]

Do not expand a \(4\times4\) determinant unnecessarily in GATE.