Find the possible values of [tex]$x$[/tex] if [tex]$A=\left[\begin{array}{cc}x^2 & 3 \\ 1 & 3x\end{array}\right]$[/tex] and [tex][tex]$B=\left[\begin{array}{cc}3 & 6 \\ 2 & x\end{array}\right]$[/tex][/tex] and [tex]$AB=BA$[/tex].



Answer :

To solve for the possible values of [tex]\( x \)[/tex] such that the matrices [tex]\( A \)[/tex] and [tex]\( B \)[/tex] commute (i.e., [tex]\( AB = BA \)[/tex]), we will follow these steps:

### Step 1: Compute [tex]\( AB \)[/tex]
First, we need to find the product [tex]\( AB \)[/tex]:
[tex]\[ A = \begin{pmatrix} x^2 & 3 \\ 1 & 3x \end{pmatrix}, \quad B = \begin{pmatrix} 3 & 6 \\ 2 & x \end{pmatrix} \][/tex]

The product [tex]\( AB \)[/tex] is calculated as:
[tex]\[ AB = \begin{pmatrix} x^2 & 3 \\ 1 & 3x \end{pmatrix} \begin{pmatrix} 3 & 6 \\ 2 & x \end{pmatrix} \][/tex]

Perform the matrix multiplication:
[tex]\[ AB = \begin{pmatrix} x^2 \cdot 3 + 3 \cdot 2 & x^2 \cdot 6 + 3 \cdot x \\ 1 \cdot 3 + 3x \cdot 2 & 1 \cdot 6 + 3x \cdot x \end{pmatrix} = \begin{pmatrix} 3x^2 + 6 & 6x^2 + 3x \\ 3 + 6x & 6 + 3x^2 \end{pmatrix} \][/tex]

### Step 2: Compute [tex]\( BA \)[/tex]
Next, we find the product [tex]\( BA \)[/tex]:
[tex]\[ BA = \begin{pmatrix} 3 & 6 \\ 2 & x \end{pmatrix} \begin{pmatrix} x^2 & 3 \\ 1 & 3x \end{pmatrix} \][/tex]

Perform the matrix multiplication:
[tex]\[ BA = \begin{pmatrix} 3 \cdot x^2 + 6 \cdot 1 & 3 \cdot 3 + 6 \cdot 3x \\ 2 \cdot x^2 + x \cdot 1 & 2 \cdot 3 + x \cdot 3x \end{pmatrix} = \begin{pmatrix} 3x^2 + 6 & 9 + 18x \\ 2x^2 + x & 6 + 3x^2 \end{pmatrix} \][/tex]

### Step 3: Equate [tex]\( AB \)[/tex] and [tex]\( BA \)[/tex]
Given that [tex]\( AB = BA \)[/tex], we set the corresponding entries of both matrices equal to each other:

1. [tex]\( 3x^2 + 6 = 3x^2 + 6 \)[/tex] (This equation is always satisfied.)

2. [tex]\( 6x^2 + 3x = 9 + 18x \)[/tex]

3. [tex]\( 3 + 6x = 2x^2 + x \)[/tex]

4. [tex]\( 6 + 3x^2 = 6 + 3x^2 \)[/tex] (This equation is always satisfied.)

### Step 4: Solve the equations
Solve the equations from step 3:

For the second equation:
[tex]\[ 6x^2 + 3x = 9 + 18x \][/tex]
[tex]\[ 6x^2 + 3x - 18x - 9 = 0 \][/tex]
[tex]\[ 6x^2 - 15x - 9 = 0 \][/tex]
Divide by 3 to simplify:
[tex]\[ 2x^2 - 5x - 3 = 0 \][/tex]
Use the quadratic formula [tex]\( x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \)[/tex]:
[tex]\[ a = 2, \, b = -5, \, c = -3 \][/tex]
[tex]\[ x = \frac{-(-5) \pm \sqrt{(-5)^2 - 4 \cdot 2 \cdot (-3)}}{2 \cdot 2} \][/tex]
[tex]\[ x = \frac{5 \pm \sqrt{25 + 24}}{4} \][/tex]
[tex]\[ x = \frac{5 \pm \sqrt{49}}{4} \][/tex]
[tex]\[ x = \frac{5 \pm 7}{4} \][/tex]
[tex]\[ x = 3 \text{ or } x = -\frac{1}{2} \][/tex]

For the third equation:
[tex]\[ 3 + 6x = 2x^2 + x \][/tex]
Rearrange:
[tex]\[ 2x^2 + x - 6x - 3 = 0 \][/tex]
[tex]\[ 2x^2 - 5x - 3 = 0 \][/tex]
This is the same quadratic equation as obtained previously, so the solutions are the same:
[tex]\[ x = 3 \text{ or } x = -\frac{1}{2} \][/tex]

### Conclusion
The solutions for [tex]\( x \)[/tex] are [tex]\( \boxed{3 \text{ and } -\frac{1}{2}} \)[/tex].