Your question is still vague, so I can post a vague answer only:
If you have a set of points, and want to scale the values "along a direction", rotate the points such, that the direction vector point to the x axis. Then divide the x component of the coordinates and rotate the point back. You can express this as 3 matrices:
T = Rot(alpha) * Scale * Rot(-alpha) =
= [cos(alpha) -sin(alpha); sin(alpha) cos(alpha)] * ...
[0.5, 0; 0, 1] * ...
[cos(alpha) sin(alpha); -sin(alpha) cos(alpha)]
You can multiply this to get the matrix, which scales the points in the direction vector, which includes the signed angle alpha with the x axis.