<p>When you scale along the X-axis, the X-coordinate (parallel to the axis) gets stretched, while the Y-coordinate (perpendicular to the axis) remains the same. You can think of scaling along an arbitrary axis as stretching along some diagonal.</p>

<p>Here's a pic of a square being scaled along the main diagonal (the axis pointing to &lt;1, 1> ) by factors of 2 and 0.5.</p>

<p><a href="https://i.sstatic.net/kUmir.png" rel="noreferrer"><img src="https://i.sstatic.net/kUmir.png" alt="enter image description here"></a></p>

<p>You can see that the distance along the axis (green line) gets scaled while the perpendicular distance (red line) stays the same.</p>

<p>Mathematically, this is the same as rotating until your chosen axis lies along the X-axis, scaling by X, then rotating back again. </p>

CC BY-SA 3.0
2017-09-09T18:34:01.570Z
How did you make the diagram?
Joseph Garvin
CC BY-SA 3.0
2017-09-10T10:33:54.303Z
I used Processing, good for quick and dirty sketches like this :)
russ
CC BY-SA 3.0
2017-09-10T13:31:55.677Z
Athough nearly anything could have worked. You could have used almost anykind of toolset to do this in less than 5 minutes. You could have used a editor like inkscape or illustrator, you could have written postscript, svg, TeX or javascript in a browser even webGL in that time.
joojaa
CC BY-SA 3.0
2017-09-09T12:42:07.350Z
2017-09-09T12:42:07.350Z
russ
<p>My graphics text explains rotating along the cardinal axes, then generalizes the math to show how to make a rotation matrix for rotating around an arbitrary vector. That all makes sense and I can both follow the math and picture the operations.</p>

<p>Then the text discusses scaling uniformly and in cardinal directions. Again I can follow everything. But then it goes through the math for "scaling in an arbitrary direction", and although I can follow the vector operations I don't understand what scaling in a non cardinal direction even <em>means</em>. I can start with an object rotated "right side up", and then imagine it getting wider/taller/deeper, but I don't understand what it would mean to scale it in an arbitrary direction.</p>

<p>My first thought was they must just mean scaling each cardinal direction by a different amount, but that can't be right because they don't end up with a diagonal matrix (take the identity matrix, change the first row 1 to 5 and the second row 1 to 3, and now you have a matrix that scales x by 5 and y by 3). Their 2D general scaling matrix is below.</p>

<p><a href="https://i.sstatic.net/U75St.jpg" rel="noreferrer"><img src="https://i.sstatic.net/U75St.jpg" alt="enter image description here"></a></p>

<mathematics><matrix><linear-algebra>
What does it *mean* to scale in an arbitrary direction?
Joseph Garvin
# What does it *mean* to scale in an arbitrary direction?

(Asked by: username_0 on 2017-09-09)

My graphics text explains rotating along the cardinal axes, then generalizes the math to show how to make a rotation matrix for rotating around an arbitrary vector. That all makes sense and I can both follow the math and picture the operations.

Then the text discusses scaling uniformly and in cardinal directions. Again I can follow everything. But then it goes through the math for "scaling in an arbitrary direction", and although I can follow the vector operations I don't understand what scaling in a non cardinal direction even *means*. I can start with an object rotated "right side up", and then imagine it getting wider/taller/deeper, but I don't understand what it would mean to scale it in an arbitrary direction.

My first thought was they must just mean scaling each cardinal direction by a different amount, but that can't be right because they don't end up with a diagonal matrix (take the identity matrix, change the first row 1 to 5 and the second row 1 to 3, and now you have a matrix that scales x by 5 and y by 3). Their 2D general scaling matrix is below.

[![enter image description here](https://i.sstatic.net/U75St.jpg)](https://i.sstatic.net/U75St.jpg)

**Tags:** mathematics, matrix, linear-algebra


---

## 1 answers

### Answer by username_1 on 2017-09-09. Score: 7 | Accepted answer

When you scale along the X-axis, the X-coordinate (parallel to the axis) gets stretched, while the Y-coordinate (perpendicular to the axis) remains the same. You can think of scaling along an arbitrary axis as stretching along some diagonal.

Here's a pic of a square being scaled along the main diagonal (the axis pointing to <1, 1> ) by factors of 2 and 0.5.

[![enter image description here](https://i.sstatic.net/kUmir.png)](https://i.sstatic.net/kUmir.png)

You can see that the distance along the axis (green line) gets scaled while the perpendicular distance (red line) stays the same.

Mathematically, this is the same as rotating until your chosen axis lies along the X-axis, scaling by X, then rotating back again.

> **Comments:**
> **username_0**: How did you make the diagram?  
> **username_1**: I used Processing, good for quick and dirty sketches like this :)  
> **username_2**: Athough nearly anything could have worked. You could have used almost anykind of toolset to do this in less than 5 minutes. You could have used a editor like inkscape or illustrator, you could have written postscript, svg, TeX or javascript in a browser even webGL in that time.  

---

