Yes I know that there's a difference otherwise it wouldn't have a different name. What I'm really looking for is a compare-contrast of the structure and function because it seems to me that these two structures are very similar. Their general structure looks to be the same as well as their purpose (to protect the cell) and they're both made of peptidoglycan. So what distinguishes these two things?
It helps Bacteria adhere to tissue or other surfaces. Many bacteria can stick to specific substrates (like a specific type of host cell), and they can also adhere to other bacteria and then form biofilms.
Bacterial cell walls and capsules are indeed two very different things, with unique compositions and functions:
Bacterial Cell Wall:
-found in all gram-positive and gram-negative bacteria (but slightly different in each)
-composition: a thick layer of peptidoglycan found outside of the cell membrane (in gram-positives) or a thin layer of peptidoglycan found between the inner and outer cell membranes (in gram-negatives) *remember that gram-positives do not have an outer cell membrane
-function: to maintain the integrity of the cell (it holds everything together, but doesn't really 'protect' the cell per se)
Bacterial Capsule:
-found in some gram-positive and gram-negative bacteria (but not all)
-composition: a dense layer of polysaccharides, NOT peptidoglycan, found outside of the cell envelope (some capsules contain amino acids, like in B. anthracis, but this is the exception, rather than the rule)
-function: to protect the cell; capsules can protect the cell from desiccation, and can prevent the bacteria from being recognized and 'eaten' by host immune system cells like macrophages; capsules can also help bacteria to adhere to surfaces by forming biofilms