user33875: How many moves does it take a knight to move 1 square forward?
For example, if I wanted to move a knight from e5 to e4 what is the minimum number of moves it would take?

user8888: Assuming an unobstructed chessboard, it takes three moves to move one square horizontally or vertically and normally takes two to move one square diagonally. However moving from a corner square to the diagonally adjacent square or vice-versa requires four moves.
A knight has eight possible moves, they can be expressed in vector form as (+1,+2), (+2,+1), (-1,+2), (-2,+1), (+1,-2), (+2,-1), (-1,-2), (-2,-1). We observe that the sum of the horizontal and vertical components is always odd, or to put it in chess terms the square a knight lands on will always be a different colour from the one they started on.
This means that moving to a square of the same color will always take an even number of moves, while moving to a square of a different color will always take an odd number. This implies that a one square diagonal move will always take at least two moves, and a one square straight move at least three.
On an infinite chess board, we can build one square diagonal moves by combining two regular knight moves.
(+1,+1) = (+2,-1) + (-1,+2)
(-1,+1) = (-2,-1) + (+1,+2)
(+1,-1) = (+2,+1) + (-1,-2)
(-1,-1) = (-2,+1) + (+1,-2)

To build a straight move we can combine one of our diagonal moves with a regular knight move.
(+1,0) = (+2,-1) + (-1,+1) = (+2,+1) + (-1,-1)
(0,+1) = (-1,+2) + (+1,-1) = (+1,+2) + (-1,-1)
(-1,0) = (-2,+1) + (+1,-1) = (-2,-1) + (+1,+1)
(0,-1) = (+1,-2) + (-1,+1) = (-1,-2) + (+1,+1)

On a real chessboard not all moves are always possible. For straight  moves, and most diagonal moves we can work around this by re-ordering the moves, starting with a move that moves away from the edge/corner and ending with a move that moves back towards the edge/corner.
However if we are trying to move diagonally from or to a corner, re-ordering does not help us. Whichever order we perform the two move sequence in, it will take us outside the board. Thus to move from a corner to the diagonally requires first moving to a square adjacent to our destination (since these are the only possible moves from a corner). Then using three further moves to actually reach our destination.

user10380: Not to detract from db_max's answer with its marvellous picture, but here's another way to arrive at the answer.
When a knight moves, it moves from a white square to a black square or vice versa. You ask about how many moves it takes to move from e5 to e4. e5 is black and e4 is white, so the answer is an odd number. The squares are not a knight's-move apart, so the answer is not 1. As db_max's picture shows, the knight can move there in 3 moves. So the answer is 3.

user31955: Depends on whether the square is diagonal (2 moves) or not (3) as shown in the diagram below:


33875: <p>How many moves does it take a knight to move 1 square forward?</p>
<p>For example, if I wanted to move a knight from e5 to e4 what is the minimum number of moves it would take?</p>
 8888: <p>Assuming an unobstructed chessboard, it takes three moves to move one square horizontally or vertically and normally takes two to move one square diagonally. However moving from a corner square to the diagonally adjacent square or vice-versa requires four moves.</p>
<p>A knight has eight possible moves, they can be expressed in vector form as (+1,+2), (+2,+1), (-1,+2), (-2,+1), (+1,-2), (+2,-1), (-1,-2), (-2,-1). We observe that the sum of the horizontal and vertical components is always odd, or to put it in chess terms the square a knight lands on will always be a different colour from the one they started on.</p>
<p>This means that moving to a square of the same color will always take an even number of moves, while moving to a square of a different color will always take an odd number. This implies that a one square diagonal move will always take at least two moves, and a one square straight move at least three.</p>
<p>On an infinite chess board, we can build one square diagonal moves by combining two regular knight moves.</p>
<pre><code>(+1,+1) = (+2,-1) + (-1,+2)
(-1,+1) = (-2,-1) + (+1,+2)
(+1,-1) = (+2,+1) + (-1,-2)
(-1,-1) = (-2,+1) + (+1,-2)
</code></pre>
<p>To build a straight move we can combine one of our diagonal moves with a regular knight move.</p>
<pre><code>(+1,0) = (+2,-1) + (-1,+1) = (+2,+1) + (-1,-1)
(0,+1) = (-1,+2) + (+1,-1) = (+1,+2) + (-1,-1)
(-1,0) = (-2,+1) + (+1,-1) = (-2,-1) + (+1,+1)
(0,-1) = (+1,-2) + (-1,+1) = (-1,-2) + (+1,+1)
</code></pre>
<p>On a real chessboard not all moves are always possible. For straight  moves, and most diagonal moves we can work around this by re-ordering the moves, starting with a move that moves away from the edge/corner and ending with a move that moves back towards the edge/corner.</p>
<p>However if we are trying to move diagonally from or to a corner, re-ordering does not help us. Whichever order we perform the two move sequence in, it will take us outside the board. Thus to move from a corner to the diagonally requires first moving to a square adjacent to our destination (since these are the only possible moves from a corner). Then using three further moves to actually reach our destination.</p>
 10380: <p>Not to detract from <a href="https://chess.stackexchange.com/a/41197">db_max's answer</a> with its marvellous picture, but here's another way to arrive at the answer.</p>
<p>When a knight moves, it moves from a white square to a black square or vice versa. You ask about how many moves it takes to move from e5 to e4. e5 is black and e4 is white, so the answer is an odd number. The squares are not a knight's-move apart, so the answer is not 1. As db_max's picture shows, the knight can move there in 3 moves. So the answer is 3.</p>
 31955: <p>Depends on whether the square is diagonal (2 moves) or not (3) as shown in the diagram below:
<a href="https://i.stack.imgur.com/pyRkp.png" rel="noreferrer"><img src="https://i.stack.imgur.com/pyRkp.png" alt="enter image description here" /></a></p>
