pectin the substance which causes jams and jellies to set, is a carbohydrate which exists in the cell walls of fruits and vegetables.
Unripe fruits contain a predecessor of pectin, called protopectin or pectose. As the fruit ripens, enzymes convert this into pectin, the quantity of which reaches its maximum just before the fruit is fully ripe. Continuing enzyme action turns it into pectic acid. Neither pectose nor pectic acid has the setting power of pectin itself; hence the well-known difficulty of making jam or jelly with fruit that is overripe or markedly underripe.