So I have seen images of soldiers and warriors wearing their swords in scabbards/sheaths that are hanging down to almost the knee. I am assuming it is something to do with horse riding as I have noticed it is almost always cavalry depicted doing so.
Here is an example of what I am talking about: https://www.artstation.com/artwork/W1VEQ
Thanks in advance.
It's primarily for cavalry use. It keeps the hilt out of the way of the left arm (which will be holding the reins) when mounted, and keeps the sword clear of the feet when mounting and dismounting. Especially since cavalry swords tend to be longer than infantry swords, the horizontal or angled carry also keeps the end of the scabbard off the ground.
It isn't the most convenient carry for use on foot, since the sword will bounce around if the soldier runs, and it can bump into things when turning around. This kind of horizontal/angled carry has been used on foot to accommodate very long swords, too long to wear vertically at the hip without hitting the ground (e.g., long rapiers). Military sword suspension like this often includes being able to hang the top scabbard ring directly from the belt, allowing the sword to hang vertically, with the hilt at the hip:
When mounted, the sword can either be in a similar position to how it hangs on foot (when not hitched up at the hip as above), across the thigh with the hilt forwards:
However, this isn't the only option. The sword can be worn with the hilt backwards:
or hanging vertically, usually behind the left leg:
https://commons.wikimedia.org/wiki/File:Napoleon_Cuirassier_in_1809_by_Bellange.jpg
https://commons.wikimedia.org/wiki/File:Bataille_Waterloo_1815_reconstitution_2011_cuirassier.jpg
Manchu/Qing cavalry were noted for a hilt-backwards carry:
as discussed by u/lordtiandao in https://www.reddit.com/r/AskHistorians/comments/5bk1yd/china_why_qing_dynasty_sabres_worn_backward/ Their sabre/dao was often worn hilt-backwards while on foot, too. This keeps the hilt away from the bow when shooting (note that the Manchu/Qing bow is a large bow, much larger than most bows used on horseback).
From the mid-late 19th century onwards, as cavalry began using revolvers and magazine-fed carbines and rifles, the sword became less likely to be used, especially when on foot. The sword commonly began being hung from the saddle, rather than being worn by the cavalryman. The most common position was hanging vertically, behind the left leg (similar to the position seen a few pictures up):
https://commons.wikimedia.org/wiki/File:The_British_Army_on_the_Home_Front,_1914-1918_Q30432.jpg
https://commons.wikimedia.org/wiki/File:French_Republican_Guard_cavalry_(3).jpg
An alternative position was under the left thigh, with the sword in a similar position to that used by the Mongol cavalry above, except under the thigh instead of on top:
A variety of sword suspensions have been used by cavalry. In addition to this slung horizontally/angled from the belt, across the thigh, the sword could be worn horizontally at the belt (at the hip or waist), or, if not too long, hung vertically from the hip:
https://klimbim2014.files.wordpress.com/2016/08/russian-cavalryman-wwi-bw.jpg
https://commons.wikimedia.org/wiki/File:Tomb_monument_of_a_cavalryman_from_1st_century_AD_(Germanic_Roman_Museum_Cologne_Germany).jpg (this wear on the right side allows it to be drawn without the (large) shield getting in the way)
Cavalrymen, and especially cavalry officers, being the dashing and fashionable things that they were in the 18th and 19th century, were fashion-setters, and their carry of the sword was copied by infantry and naval officers, for whom the practical considerations for mounting/dismounting were often irrelevant. The low-slung look was often exaggerated, sometimes to the point of making the sword difficult to draw (due to the hilt being too low). As described in James, A New and Enlarged Military Dictionary, 1802,
It is not, however, so conveniently used by us as it is by the Austrians. - The latter have it girted round their waists, so that it hangs without any embarrassment to the wearer close to the left hip or thigh; whereas with us, it is suspended in an awkward diagonal manner from a cross belt over the loins, and is scarcely visible in front, except occasionally, when it is drawn, or gets between the officer's legs, and sometimes trips him up when off duty. We could exemplify our ideas on this subject by various known occurrences, such as the sword being suspended so much out of the grasp of the wearer, that his right hand has appeared to run after the hilt, which has as constantly evaded its reach by the left side bearing it off, in proportion as the right turned towards it; by officers being reduced to the necessity of applying to their serjeants, &c. to draw their swords, &c. but it is not our wish to turn any regulation into ridicule. - It is, however, our duty, and the duty of all men who write for the public, to point out practical inconveniences, &c.
When it comes to swords and officers, fashion can trump practicality.
Reference:
James: https://books.google.com/books?id=pixOAAAAYAAJ&pg=RA47-PA17&lpg=RA47-PA17