I'm trying to find an affine transformation that maps the unit circle to an ellipse centered at $(1,3)$ such that points P$(-3,-1)$ and R$(5,7)$ are at the greatest distance from the centre of the ellipse along the major axis while points Q$(0,4)$ and S$(2,2)$ are at the greatest distance from the centre of the ellipse along the minor axis.
I think we need to rotate the unit disc followed by scaling and then another rotation. But I don't know how to find the matrix that does that. Ultimately, I think there will be translation by $(1,3)^T.$
Any help appreciated.