Please check for me, affine transformations

Brief solutions at the bottom

In this question, f and g are both affine transformations. The transformations f is a reflection in the line y = -x +1, and g maps the points (0,0), (1,0) and (0,1) to the points (1,5), (1,-4) and (0,-5) respectively.

a) Determine g in the form g(x) = Ax + a, where A is a 2 x 2 matrix and a is a vector with two components.

b) Write down the matrix that represents reflection in an appropriate line through the origin, and find f (in the same form as for g in part (a)) by first translating an appropriate point to the origin.

c) Find the affine transformation g o f (in the same form as for g and f in parts (a) and (b)).

d) Hence or otherwise, find the images of the points (0,0), (0,-2) (2,-2) and (2,0) under g o f. Mark these points and images on the same diagram, making it clear which points maps to which. Describe g o f geometrically as a single transformation.

Here is what I got;

a) g(x) = (0 -1)x + (1)

1 0 -5

b) f(x) = (0 -1) + (1)

-1 0 1

c) gof = (1 0)x + ( 0)

0 -1 -6

d) Using solution from (c) I got images are (0,-6) , (0, -4), (2,-4) and (2,-6)

Otherwise I got images as (0,-4) , (0,-2) , ( 2,-2) and (2,-4)

Don’t know which if any is correct. I might have made mistakes in earlier workings.