If A is a square matrix
Question:

If $A$ is a square matrix such that $A^{2}=A$, then write the value of $7 A-(l+A)^{3}$, where $/$ is the identity matrix.

Solution:

$7 A-(I+A)^{3}=7 A-\left(I^{3}+A^{3}+3 A^{2} I+3 A I^{2}\right)$

$=7 A-\left(I+A \cdot A^{2}+3 A^{2}+3 A\right)$

$=7 A-(I+A \cdot A+3 A+3 A) \quad\left(\because A^{2}=A\right)$

$=7 A-\left(I+A^{2}+6 A\right)$

$=7 A-(I+A+6 A) \quad\left(\because A^{2}=A\right)$

$=7 A-(I+7 A)$

$=7 A-I-7 A$

$=-I$

Hence, the value of $7 A-(I+A)^{3}$ is $-I$.