2 "Linear Algebra" Posts

How Large Language Models (LLMs) Think: Turning Meaning into Math

Exploring how large language models use linear algebra to create geometric meaning
What You'll Learn
  • How an LLM turns words and tokens into numerical vectors it can process
  • How distance and direction in embedding space can represent relationships in meaning
  • Why linear algebra and geometry are two ways of describing the same internal structure
  • How matrix operations transform information as it moves through a model
  • Why high-dimensional spaces can represent many subtle features of language at once
  • How probability guides a model from its current context toward the next token

Using SymPy in Python When NumPy Isn't Enough

Choosing exact symbolic mathematics when floating-point approximations are not good enough
What You'll Learn
  • Why floating-point numbers cannot represent many ordinary decimal values exactly
  • How SymPy keeps rational values exact instead of introducing floating-point approximations
  • When tolerance checks such as math.isclose are appropriate and when exact math matters
  • How symbolic computation can calculate derivatives and solve equations without numerical approximation
  • When SymPy is a better choice than NumPy for a mathematical problem
  • How SymPy and NumPy complement each other as tools for precision and performance