p = {G/C, (C - G)/C}

A = {{(G - C)/2, G}, {0, G/2}}

X = {x, 1 - x}

p   .  (A   .  X)  -  X  .  (A  .  X )

Simplify[%]

f[x_, G_, C_] = 1/(2 C) (G -  C x )^2

Plot[f[x, 1, 5], {x, 0, 1}]