Actually, you're almost guaranteed to lose money that way, because lotteries are done for profit, which means that the money they pay out is less than the price of all the tickets combined. Usually, it's about half as much.

conform makes a good point in his wu - Most lottery jackpots are progressive, meaning that when nobody gets the winning combination, the money is added to next week's jackpot. This means there can be situations when there's more moeny in the pot than it would cost to buy a ticket for all possible combinations. However, a big jackpot also makes the lottery more attractive, so you're more likely to have to share the money.