Why does water change the texture in cornstarch?

Water changes the texture of cornstarch by causing the starch molecules to absorb water and swell, which creates a gel-like substance. This process is known as gelatinization, and it's what gives cornstarch its thickening power. When water is added to cornstarch, the starch molecules begin to absorb water and expand. This causes the cornstarch particles to clump together, which creates a network that traps water and forms a gel.

The amount of water that is added to cornstarch will determine the texture of the resulting gel. If only a small amount of water is added, the gel will be thick and firm. If more water is added, the gel will be thinner and more runny.

Cornstarch is a common thickening agent in many recipes, such as sauces, gravies, and puddings. It is also used in baking to make cakes, cookies, and other baked goods.