The ecological niche can be defined in terms of habitat, feeding relationships and interactions with other species.
Ecological niche: The role and space that an organism fills in an ecosystem, including all its interactions with the biotic and abiotic factors of its environment.

There are two types of ecological niche:
- Fundamental niche – all the potential resources that a species can use in its environment. Requires the absence of competition.
- Realised niche – some habitats and resources are not available because competitors occupy them. This is what the species actually uses.
Realised niches are narrower than fundamental niches, therefore the species occupies a narrower range of habitats than it would in the absence of competition. The realised niche can be regarded as a ‘competitive refuge’.