\documentclass[12pt]{article}
\usepackage[dvips]{graphics}
\usepackage{graphicx}
\usepackage{amsfonts}
\usepackage{indentfirst}
\def\proved{\begin{flushright}$\Box$\end{flushright}}
\begin{document}

The colour primaries used are defined in xyY space.

\begin{tabular*}{\textwidth}{lll}
Red         & $x = 0.640$  & $y = 0.330$  \\
Green       & $x = 0.300$  & $y = 0.600$  \\
Blue        & $x = 0.150$  & $y = 0.060$  \\
White (D65) & $x = 0.3127$ & $y = 0.3290$ \\
\end{tabular*} \\
\\

These are the primaries specified by both ITU-R BT.709 and sRGB.  Given
these chromanicities, we are given a relationship between the $XYZ$
coordinates and the values of $R$, $G$, and $B$.  For example, the $X$
value of any $RGB$ colour can be expressed as a linear combination of
the $X$ values for $R$, $G$, and $B$ individually.  Since we can derive
those from the chromanicities, we define constants $C_r$, $C_g$ and
$C_g$ to represent the factors of which the chromanicities contribute to
the resulting $XYZ$ value.  To solve these values, I'm using the
notation and ideas from the method described in Foley/van Dam.

\begin{eqnarray*}
\left[\begin{array}{c} X \\ Y \\ Z \\ \end{array}\right]
& = &
\begin{array}{cc}
\left[\begin{array}{ccc}
x_r C_r & x_g C_g & x_b C_b \\
y_r C_r & y_g C_g & y_b C_b \\
z_r C_r & z_g C_g & z_b C_b \\
\end{array}\right] &
\left[\begin{array}{c} R \\ G \\ B \\ \end{array}\right]
\end{array}
\end{eqnarray*}

In order to compute the values of $C_r$, $C_g$ and $C_b$, we need a
known reference point.  For this we will use the D65 white point (black
body at 6500K) and use unity luminance ($Y$) and map this to $R = G = B
= 1$.

\begin{eqnarray*}
Y_{D65}  &=& 1 \\
X_{D65}  &=& x_{D65} \frac{Y_{D65}}{y_{D65}} \\
         &=& 0.3127 \frac{1}{0.3290} \\
         &=& 0.9505 \\
Z_{D65}  &=& z_{D65} \frac{Y_{D65}}{y_{D65}} \\
         &=& 0.3583 \frac{1}{0.3290} \\
         &=& 1.0891 \\
\end{eqnarray*}

We can now use these to solve for $C_r$, $C_g$ and $C_b$ by taking the
inverse of the following:

\begin{eqnarray*}
\left[\begin{array}{c} X_{D65} \\ Y_{D65} \\ Z_{D65} \\ \end{array}\right]
& = &
\begin{array}{cc}
\left[\begin{array}{ccc}
x_r & x_g & x_b \\
y_r & y_g & y_b \\
z_r & z_g & z_b \\
\end{array}\right] & \left[\begin{array}{c} C_r \\ C_g \\ C_b \\ \end{array}\right]
\end{array}
\end{eqnarray*}

We get:
\begin{eqnarray*}
\left[\begin{array}{c} C_r \\ C_g \\ C_b \\ \end{array}\right]
& = &
\begin{array}{cc}
\left[\begin{array}{ccc}
    2.0884 & -0.9906 & -0.3213 \\
   -1.1553 &  2.2361 &  0.0495 \\
    0.0669 & -0.2454 &  1.2718 \\
\end{array}\right] & \left[\begin{array}{c} 0.9505 \\ 1 \\ 1.0891 \\ \end{array}\right]
\end{array} \\
& = & \left[\begin{array}{c} 0.6444 \\ 1.1919 \\ 1.2033 \\ \end{array}\right] \\
\end{eqnarray*}

Submitting back, we get the final matrix:

\begin{eqnarray*}
\left[\begin{array}{c} X \\ Y \\ Z \\ \end{array}\right]
& = &
\begin{array}{cc}
\left[\begin{array}{ccc}
x_r C_r & x_g C_g & x_b C_b \\
y_r C_r & y_g C_g & y_b C_b \\
z_r C_r & z_g C_g & z_b C_b \\
\end{array}\right] & \left[\begin{array}{c} R \\ G \\ B \\ \end{array}\right]
\end{array} \\
& = &
\begin{array}{cc}
\left[\begin{array}{ccc}
0.4124 & 0.3576 & 0.1805 \\
0.2126 & 0.7152 & 0.0722 \\
0.0193 & 0.1192 & 0.9505 \\
\end{array}\right] & \left[\begin{array}{c} R \\ G \\ B \\ \end{array}\right]
\end{array} \\
\end{eqnarray*}

Inverting this we get the desired matrix:
\begin{eqnarray*}
\left[\begin{array}{c} R_{sRGB} \\ G_{sRGB} \\ Z_{sRGB} \\ \end{array}\right]
& = &
\begin{array}{cc}
\left[\begin{array}{ccc}
 3.2406 & -1.5372 & -0.4986 \\
-0.9689 &  1.8758 &  0.0415 \\
 0.0557 & -0.2040 &  1.0570 \\
\end{array}\right] & \left[\begin{array}{c} X \\ Y \\ Z \\ \end{array}\right]
\end{array} \\
\end{eqnarray*}

\end{document}
