# What is K-Nearest Neighbors? Definition & Technical Mechanics

> **Source:** [SPIDITS AI AI Glossary](https://spidits.com/ai-glossary)  
> **Category:** Foundational AI  
> **Canonical Citation:** [https://spidits.com/ai-glossary/k-nearest-neighbors](https://spidits.com/ai-glossary/k-nearest-neighbors)

## Definition
K-Nearest Neighbors (KNN) is a simple, non-parametric supervised learning algorithm used for classification and regression, which predicts target labels by looking at the majority vote of K closest neighboring coordinates.

## Architectural Mechanics & Deep Dive
K-Nearest Neighbors (KNN) is a simple, non-parametric supervised learning algorithm used for classification and regression. KNN does not build an explicit model during training; instead, it stores the entire training dataset. To predict the label of a new data point, it calculates the distance to all stored points, identifies the K closest neighbors, and outputs the majority class or average value.

## Industry Applications & Real-World Use Cases
Recommendation lists, classification benchmarks, and search matching.

## Frequently Asked Questions

### Is KNN a parametric or non-parametric model?
It is non-parametric, meaning it makes no assumptions about the underlying data distribution and stores the training data directly.

### What is a major limitation of KNN?
It is computationally slow during inference because it must calculate distances to all training points for every new query.

## Related Terminology
- [supervised-learning](https://spidits.com/ai-glossary/supervised-learning)
- [euclidean-distance](https://spidits.com/ai-glossary/euclidean-distance)
- [machine-learning](https://spidits.com/ai-glossary/machine-learning)

---
*From the SPIDITS AI Knowledge Base (300+ terms indexed). Explore full technical definitions: [https://spidits.com/ai-glossary](https://spidits.com/ai-glossary)*
