Is there a rigorous definition of a line? In the sources I can find, line is considered a primitive concept (a one without definition). There is something, however, in such an intuitive definition that doesn't sit well with me.
Were there any attempts to rigorously define line?
And if there weren't, why? What makes line a concept which shouldn't be defined rigorously?
 A: In the plane geometry that bears David Hilbert's name, there are five undefined terms:


*

*Line

*Point

*Lies on (as in a point lies on a plane) (this is often called "incidence")

*Between (as in one point is between two other points)

*Congruent (as in two line segments or two angles are congruent)


However, just because they are undefined does not mean that their behaviour is undefined. That is what all the axioms are there for.
From a logical standpoint, there is a reason that some terms must be undefined, and it's in two parts: First of all, definitions cannot be circular. Second, there are only finitely many words available to define any single concept. Together these two reasons makes it so that any chain of repeatedly asking "But what is the definition of that term?" is bound to eventually terminate in a standstill where you don't have any more words left to describe the concepts without resorting to circularity. Therefore, it is generally accepted that you just have to start somewhere, with names like "point" and "line" which you won't explain what is, just how they behave.
A: Euclid's Approach
I assume the context here is classical geometry in the style of Euclid. At the very beginning of Euclid's Elements, he defines:

A point is that which has no part.
A line is breadthless length.

That is, a point is that thing that has no extent in any direction, and a line has length but no width. These definitions are suitable for seeing what kinds of things he's talking about, but they're not very precise. A more modern approach might be to take one of the two following perspectives.
Axiomatic Approach
This is the approach your sources probably use. With an axiomatic approach, the basic concepts like points and lines don't have definitions at all. Their basic properties and relationships with each other are then given as axioms, and we draw conclusions from those axioms alone. The advantage is that we can then apply those conclusions to anything satisfying the axioms.
Algebraic Approach
The other modern approach is to look at the space we're working with (say, the plane), and assign each point on it coordinates of the form $(x,y)$ (e.g., "$(2,4)$", or "$(1.4,-9.6)$"). A line would then be defined as a set of points satisfying an equation of the form $ax + by = c$, for some specific choice of $a$, $b$, and $c$. The advantage of this approach is that numbers and equations are very expressive, and they allow us do describe much more sophisticated concepts and techniques.
