Stocks ended an up-and-down day mostly lower as losses in materials and industrial companies offset gains elsewhere in the market, the AP reports. Basic materials companies fell Tuesday on worries that higher costs and weakening demand are eroding profits. Paint maker PPG Industries dropped 10.1%. Energy stocks climbed with the price of oil, and technology stocks recovered some of the sharp losses caused by last week's rapid rise in interest rates. The S&P 500 index fell 4 points, or 0.1%, to 2,880. The Dow Jones Industrial Average lost 56 points, or 0.2%, to 26,430. The Nasdaq composite rose 2 points to 7,738. (More stock market stories.)