I found it a nice exercise to derive this by thinking about where the transformation matrix takes the basis vectors and origin. Here the first basis vector [1,0] is taken to the first column [ux, uy], the second basis vector [0,1] is taken to the second column [vx, vy], and the origin is taken to the new origin [ox, oy] in the third column, capturing the translation.
I found it a nice exercise to derive this by thinking about where the transformation matrix takes the basis vectors and origin. Here the first basis vector [1,0] is taken to the first column [ux, uy], the second basis vector [0,1] is taken to the second column [vx, vy], and the origin is taken to the new origin [ox, oy] in the third column, capturing the translation.