You probably do not want to know this, but it is not a defect in your carpet. It is called soil filtration which is a term used to describe dark, gray (sometimes black) lines that appear on carpet. Soil filtration occurs because the carpet acts as a filter to dust and other airborne particles resulting from a concentrated flow of air over the carpet. It is most commonly found around baseboards, under doors and along the edges of stairs.
The primary reason for this concentrated flow of air is pressure changes within a room. Pressure changes occur within a room from either the effect of warmer air rising or from your heater or air conditioner blowing air into a room without a return vent. Because of the pressure change, air tries to flow either in or out of the room. For walls that are not sealed to the floor, air moves in and out of the room at these areas and that is why you will see it along walls and stairs. For these situations, unless the air leakage areas are addressed, the soil filtration will continue to occur.
Also, have you ever noticed a grayish or dark line at the doorway of a room? Especially a closet or a room that is rarely used and the door is always shut. Once again, soil filtration. It is quite common for dirt and dust to accumulate under doors when they are shut. Due to pressure differences between rooms (as described above), air will flow from the high pressure room to the lower pressure through the largest available holes. With the door shut, the undercut of the door is generally the largest available hole. Therefore, as the air passes between the door undercut and the carpeting, the carpet acts like a filter taking out dirt and dust particles from the air. For these situations, you might consider leaving the door cracked so air can move through the doorway and not under the door.
For more information, visit my website www.graysoncleans.com