I've been somewhat fixated on and very confused by Kant's suggestion that mathematics (or at least certain aspects of it) can be known independent of experience. For example, he makes reference to three straight lines and asks us to consider the straight lines and the number three to construct a figure (a triangle): something that could not be done with merely two lines (as two lines can't enclose a space). However, when he begins to break down how we know this, he claims that it is through intuition. He seems to be suggesting that because space is something we just know, we can move the lines in our minds construct the triangle from the lines a priori.

My issue is that we only know what a triangle is through experience and definition: manipulating three straight lines to form a triangle could never be done without knowing what a triangle's properties are in the first place -- which is something you're not born with knowledge of. So how can he claim that the formation of the triangle is intuitive and not rooted in experience? I assume I'm missing some steps in his thought process. Another example could perhaps be found in algebra, but I suppose sticking with geometry is sufficient for my question. Any advice?