A lambda function is an anonymous function that can be defined in a single line of code. It is typically used for simple operations and doesn't require a formal function definition.