\documentclass[12pt]{article} \usepackage{amssymb,amsmath,amscd,concmath,amsfonts} \usepackage{color} \pagestyle{empty} \begin{document} \begin{equation*} \begin{bmatrix} -1 & {\color{blue} f'_1} \\ {\color{blue} f'_2} & -1 \end{bmatrix} \begin{bmatrix} p_{11} & p_{12} \\ p_{12} & p_{22} \end{bmatrix} + \begin{bmatrix} p_{11} & p_{12} \\ p_{12} & p_{22} \end{bmatrix} \begin{bmatrix} -1 & {\color{blue} f_2'} \\ {\color{blue} f'_1} & -1 \end{bmatrix} = \begin{bmatrix} -1 & 0 \\ 0 & -1 \end{bmatrix}, \end{equation*} \end{document}