Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Linear Transformation to Shrinking/Expand along a given direction

  1. Dec 24, 2007 #1
    Assuming that shrinking/expanding in a given direction is a linear transformation in [itex]R^3[/itex], what would be the matrix to perform it?

    To be more precise, given a vector


    with a length of 1, i.e. [tex]||e||=1[/tex] and a factor [itex]\lambda[/itex], I am looking for a matrix [itex]A[/itex] such that for every vector x the vector [itex]y=A\cdot[/itex]x has a projection on e that is longer than the projection of x by the factor [itex]\lambda[/itex], while all sizes orthogonal to e are kept unchanged.

    I came up with a matrix [itex]A[/itex] that contains squares and products of the [itex]e_i[/itex] and, worse, would contain complex numbers for [itex]\lambda<1[/itex]. I expected something simpler? Any ideas?

  2. jcsd
  3. Dec 24, 2007 #2


    User Avatar
    Science Advisor

    A fairly standard way of writing a linear transformation as a matrix is to see what it does to each of your basis vectors. The coefficients of the basis vectors when the result of applying the transformation to [itex]\vec{i}[/itex] is written as a linear combination of the basis vectors are the first column, etc. In this case, applying this linear transformation to [itex]\vec{i}[/itex] is the projection of [itex]\vec{i}[/itex] on [itex]\vec{e}[/itex] multiplied by [itex]\lambda[/itex].

    In particular, since [itex][e_1, e_2, e_]3][/itex] has length 1, the projection of [itex]\vec{i}[/itex] on it is [itex][e_1^2, e_1e_2,e_1e3][/itex], the projection of [itex]\vec{j}[/itex] is [itex][e_1e_2, e_2^2, e_2e_3][/itex], and the projection of [itex]\vek{k}[/itex] is [itex][e_1e_3, e_2e_3, e_3^2][/itex]. The matrix is
    [tex]\left[\begin{array}{ccc} \lambda e_1^2 & \lambda e_1e_2 & \lambda e_1e_3 \\ \lambda e_1e_2 & \lambda e_2^2 & \lambda e_2e_3 \\ \lambda e_1e_3 & \lambda e_2e_3 & \lambda e_3^2 \end{array}\right][/tex]

    If you have only squares and products, as my formula does, I don't see how you could possibly get complex numbers!
  4. Dec 24, 2007 #3
    Something is missing in your matrix, it seems. Try e=(1,0,0). The matrix will have just [itex]\lambda[/itex] in the top left corner. Now apply to vector (1,1,1). The result is [itex](\lambda,0,0)[/itex], so the coordinates orthogonal to e are not kept but killed.-(

  5. Dec 24, 2007 #4


    User Avatar
    Science Advisor

    Your right- I just calculated the projection onto [itex][e_1, e_2, e_3][/itex]. I'll try again. The vector [1, 0, 0] has projection [itex][e_1^2, e_1e_2,e_1e3][/itex] onto [itex][e_1, e_2, e_3][/itex] and orthogonal projection [itex][e_1^2-1, e_1e_2,e_1e3][/itex] so your transformation maps [1, 0, 0] to [itex][(\lambda-1)e_1^2- 1, (\lambda-1)e_1e_2, (\lambda-1)e_1e_3)[/itex] and similarly for the [0, 1, 0] and [0, 0, 1].

    Unless I have made another silly error (quite possible) the matrix is:
    [tex]\left[\begin{array}{ccc} (\lambda-1)e_1^2-1 & (\lambda-1)e_1_e2 & (\lambda-1)e_1e_3 \\ (\lambda-1)e_1e_2 & (\lambda-1)e_2^2- 1 &(\lambda-1)e_2e_3 \\(\lambda-1)e_1e_3 & (\lambda-1)e_2e_3 & (\lambda-1)e_3^2-1\end{array}\right][/tex]
  6. Dec 25, 2007 #5
    Great, thanks. I thought I made a mistake, because I hoped for something simpler.

    The reason why I was talking about complex numbers was that I started from a vector [itex]k[/itex] which, in your notation, would now be [itex]k=\sqrt{\lambda-1}\cdot e[/itex]. This vector formally combines the direction e and the shrink/expand factor [itex]\lambda[/itex]. Obviously the square root wil go complex for [itex]\lambda<1[/itex]. But of course the complex numbers disappear again in the matrix itself.

    The matrix can be written as [itex]k\cdot k^T-1_{diag}[/itex] --- Not that this tells me anything interesting, though:-)

    Seasons Greetings,
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook