Here we show different ways to create closed curves using the a command. Example 1 uses 2 a commands - the 2nd starting where the first finished. Note the negative value of the x-axis ending coordinate.
Example 2 and Example 3 show a closed ellipse drawn with 1 a command, but including a z command to close the curve.
The circle in Example 4 is also drawn with a single a command and also includes the close command z.