Tensor Analysis Essentials
Master the Mathematics of Multidimensional Data and Linear Transformations
Many chemistry professionals struggle with tensor mathematics because traditional textbooks treat it as pure abstraction, disconnected from real applications.
238 pages11 chaptersSep 21, 2026Tensor Calculus
About this book
This book bridges that gap by teaching tensor analysis through the lens of quantum and computational chemistry—the exact domain where you need these tools. You'll start with tensor notation fundamentals and Einstein summation convention, then progressively build toward sophisticated applications like Hartree-Fock calculations, molecular orbital theory, and chemical bonding analysis. Each concept is grounded in chemistry examples, from coordinate transformations in molecular systems to eigenvalue problems that determine orbital energies. Whether you're implementing computational chemistry algorithms, analyzing molecular symmetry, or deepening your understanding of quantum mechanical calculations, this book provides the mathematical foundation you need. You'll learn not just the mechanics of tensor operations, but why they matter for your research and how to apply them confidently to real chemical problems.
Table of contents
- IntroductionWhy Tensors Matter for Chemistry, How to Use This Book, Mathematical Prerequisites and ReviewRead below
- Chapter 1: Tensor Notation FundamentalsFrom Scalars to Vectors to Tensors, Index Notation and Subscript Conventions, Understanding Tensor Rank and Order
- Chapter 2: Einstein Summation ConventionThe Repeated Indices Rule, Free Indices and Dummy Indices, Simplifying Complex Expressions with Einstein Convention
- Chapter 3: Covariant and Contravariant IndicesGeometric Interpretation of Index Types, Transformation Properties Under Coordinate Changes, Raising and Lowering Indices with Metric Tensors
- Chapter 4: Linear Transformations and Matrix AlgebraMatrix Fundamentals and Operations, Basis Transformations and Change of Coordinates, Representing Tensors as Matrices
- Chapter 5: Coordinate System TransformationsFrom Cartesian to Curvilinear Coordinates, Jacobian Matrices and Transformation Rules, Metric Tensor Applications in Different Coordinate Systems
- Chapter 6: Tensor Calculus and DerivativesPartial Derivatives and Tensor Behavior, Gradient, Divergence, and Curl in Tensor Form, Covariant Derivatives and Connection Symbols
- Chapter 7: Tensor Contraction and OperationsTensor Contraction Fundamentals, Outer Products, Inner Products, and Tensor Products, Tensor Algebra Rules and Manipulations
- Chapter 8: Quantum Chemistry and Tensor MethodsMolecular Orbital Theory Through Tensor Framework, Basis Set Transformations and Orbital Coefficients, Hartree-Fock Method and Tensor Formulation
- Chapter 9: Chemical Bonding and Tensor AnalysisElectron Density and Density Matrices as Tensors, Bond Order Analysis Using Tensor Methods, Symmetry Operations and Tensor Transformations
- Chapter 10: Computational Chemistry AlgorithmsEigenvalue Problems in Quantum Chemistry, Variational Principle and Tensor Optimization, Gradient Descent and Optimization Using Tensor Calculus
- Chapter 11: Practical Applications and Case StudiesImplementing Tensor Calculations in Code, Case Study: Analyzing Simple Molecules, Troubleshooting Common Tensor Errors
- ConclusionYour Tensor Mathematics Mastery, Next Steps in Your Research
- Glossary of Tensor Terms
- Further Reading and Resources
Introduction
A two-electron repulsion integral tensor for a modest molecule like benzene, computed in a basis of 100 functions, contains 1004 entries, that is 100 million numbers, most of them small but not negligible. Every one of those numbers has four indices attached to it, and every quantum chemistry package on the planet, from Gaussian to Psi4 to PySCF, stores, contracts, and transforms that object thousands of times per calculation. The people who write those packages do not think of that object as "a big array." They think of it as a rank-4 tensor with well-defined transformation behavior, and that difference in thinking is the entire subject of this book.
Consider what happens when a Hartree-Fock calculation switches from an atomic orbital basis to a molecular orbital basis. The two-electron repulsion integral tensor does not just get relabeled, it gets transformed through four separate multiplications by the orbital coefficient tensor, one for each of its four indices[1]. Written out in full summation notation, that transformation is a wall of nested sums that obscures what is actually a simple, elegant operation. Written in tensor index notation with the Einstein summation convention, it collapses to a single short line. That collapse is not a cosmetic trick. It is the difference between recognizing a pattern in five seconds and missing it entirely.
This book exists because most tensor mathematics is taught to physicists and mathematicians using examples from general relativity or continuum mechanics, subjects that have nothing to do with the molecular orbitals, density matrices, and basis sets that occupy a computational chemist's working day. That mismatch leaves a real gap. A chemist with a PhD and years of experience running electronic structure calculations can still feel unsure about why an index sits as a superscript in one equation and a subscript in another, or why a metric tensor shows up in a coordinate transformation. This introduction sets the terms of the trade for the rest of the book: what tensors are for in chemistry, how the chapters build on each other, and which mathematical tools need dusting off before the real work begins.
None of what follows requires abandoning familiar chemistry intuition. The molecular orbital coefficients already sitting in a converged Hartree-Fock output are a tensor. The overlap matrix already computed from basis functions is a tensor. The point is not to replace chemical reasoning with abstract mathematics, but to give a name and a set of operating rules to structures that have been used all along without being recognized as what they are.
Why Tensors Matter for Chemistry
A scalar, a vector, and a matrix look like three separate objects in most chemistry training, each with its own notation and its own rules. A tensor framework replaces those three separate objects with a single organizing idea: rank. A scalar is a rank-0 tensor, a vector is rank-1, a matrix (used as a linear map) is rank-2, and the two-electron repulsion integral tensor is rank-4. Once rank becomes the organizing principle rather than an afterthought, every operation used in electronic structure theory, from computing a dipole moment to assembling a Fock matrix, becomes a special case of a small number of tensor operations applied to objects of different rank.
The practical payoff shows up first in notation. A molecular orbital energy expression in full Hartree-Fock theory involves sums over occupied orbitals, sums over basis functions, and sums over electron pairs, nested three or four levels deep. Writing every summation sign explicitly produces expressions that stretch across several lines and hide the underlying symmetry of the problem. The Einstein summation convention, covered as its own subject later, removes the summation signs entirely by treating a repeated index as an instruction to sum. That single notational shift is often the difference between a derivation a chemist can follow in one reading and one that requires three passes with a pencil.
Tensor thinking also exposes structure that summation notation buries. The density matrix used in Hartree-Fock and density functional theory transforms under a change of basis in exactly the way a rank-2 tensor transforms, using the orbital coefficient tensor on both sides. Recognizing that fact means a chemist working in a new basis set, say switching from a minimal STO-3G basis to a larger 6-31G* basis, can predict how every quantity built from the density matrix will behave without rederiving anything from scratch. The transformation law is fixed once the object is correctly identified as a tensor of a given rank.
A second concrete case: symmetry-adapted linear combinations of atomic orbitals. Group theory already tells a chemist which orbitals combine under a molecule's point group, but the actual construction of the symmetry-adapted combinations is a tensor transformation, a matrix built from projection operators acting on the original basis tensor. A chemist who sees this as tensor algebra can move fluidly between the abstract character table and the concrete numerical calculation, rather than treating the two as separate skills learned in separate courses.
The table below sketches where familiar chemistry objects sit on the tensor rank ladder, which previews the full hierarchy built out in the chapter on tensor notation fundamentals.
| Rank | Chemistry example | Number of indices |
|---|---|---|
| 0 | Total energy, dipole magnitude | 0 |
| 1 | Dipole moment vector, orbital energy list | 1 |
| 2 | Overlap matrix, density matrix, Fock matrix | 2 |
| 3 | Dipole derivative tensor (IR intensities) | 3 |
| 4 | Two-electron repulsion integral tensor | 4 |
The rank-4 case deserves particular attention because it is the object that makes brute-force approaches computationally painful and tensor-aware approaches indispensable. A calculation on a medium-sized molecule with 300 basis functions produces a two-electron repulsion integral tensor with 3004, over eight billion, raw entries before symmetry reduction. No chemist manipulates that object by writing out indices by hand. Instead, every operation performed on it, contraction with orbital coefficients, permutation symmetry exploitation, screening of negligible entries, is a tensor operation with a name and a known computational cost. Understanding the tensor identity of that object is what allows a chemist to read a paper describing a new integral algorithm and actually follow the argument.
There is also a translation benefit that matters for anyone reading current computational chemistry literature. Papers on coupled-cluster theory, multireference methods, and machine-learned interatomic potentials increasingly describe their working equations directly in tensor index notation, sometimes explicitly using einsum notation because that is how the underlying code is written in libraries like NumPy or PyTorch. A chemist unfamiliar with tensor notation has to mentally translate those expressions into the summation language learned in graduate school, a slow and error-prone process. A chemist fluent in tensor notation reads the same expression directly, because it is often close to executable code.
This fluency compounds when moving from theory to implementation. Writing a Hartree-Fock code from scratch, even a simple restricted closed-shell version, involves building the overlap matrix, the core Hamiltonian, the two-electron repulsion integral tensor, and iterating the Fock matrix to self-consistency. Every one of those steps is naturally expressed as a tensor contraction, and modern scientific computing libraries are built around exactly that operation. Someone who understands tensor contraction as a mathematical operation, rather than as a mysterious function call, debugs faster and extends existing code with more confidence.
None of this requires discarding the matrix algebra already familiar from a standard physical chemistry or quantum chemistry course. Tensor analysis, as developed in this book, sits directly on top of that existing knowledge. A matrix already known as a linear map between vector spaces is simply a rank-2 tensor viewed through a wider lens, and the transformation rules already known for matrices under a change of basis are a special case of the general tensor transformation law developed across the coming chapters.
The chapter on molecular orbital theory recast in tensor language will return to every one of the objects mentioned here, the overlap matrix, the density matrix, the two-electron repulsion integral tensor, and treat each one with the full machinery of index notation, contraction, and basis transformation. What matters at this stage is recognizing that the payoff is not abstract elegance for its own sake. It is faster derivations, clearer code, and easier reading of the primary literature that already speaks this language.
How to Use This Book
The eleven numbered chapters that follow this introduction are arranged in a deliberate progression, moving from pure notation to pure chemistry and back again several times. The first three chapters, covering tensor notation fundamentals, the Einstein summation convention, and covariant versus contravariant indices, build the notational vocabulary from the ground up and assume nothing beyond basic linear algebra. Chapters four through six connect that vocabulary to matrix algebra, coordinate transformations, and calculus on tensor fields, the mathematical machinery a chemist needs before tensors can be applied to anything physical. Chapter seven catalogues the operational toolkit, contraction, outer product, inner product, and tensor product, that gets used constantly in every later chapter.
Chapters eight through eleven are where the mathematics meets the chemistry directly. Molecular orbital theory, the Hartree-Fock method, electron density and bond order analysis, and the numerical algorithms that run inside real quantum chemistry codes each get their own chapter, and each one leans on every mathematical tool introduced earlier. A chemist who skips the notational chapters and jumps straight to the Hartree-Fock chapter will find the equations unreadable, because the whole point of that chapter is to show familiar chemistry rewritten in the language built earlier. The order is not arbitrary and skipping ahead defeats the purpose.
That said, this book is not designed to be read only once from cover to cover. It works better as a working reference during an active research project, kept open next to a terminal running a quantum chemistry calculation. A chemist debugging a basis set transformation halfway through implementing a new method can jump directly to the chapter on basis transformations and change of coordinates, use its worked example, and jump back to the code. Each subchapter is written to stand reasonably well on its own once the earlier notational chapters have been read at least once.
Every chapter after this introduction follows a consistent internal rhythm. A concept is introduced in general mathematical terms first, then immediately anchored to a chemistry example, then, where relevant, connected to an operation that shows up in real code. This rhythm is intentional and mirrors how a working chemist actually needs to absorb new mathematics: not as an isolated proof, but as a tool with an immediate application. Reading a subchapter without working through its example by hand, ideally with pencil and paper, will produce recognition without retention. The index gymnastics of tensor notation only becomes automatic through repetition.
A recommended pace for someone reading this book alongside an active research or teaching schedule is one subchapter per sitting, roughly fifteen to twenty minutes of focused reading followed by five to ten minutes working through the accompanying example independently. Rushing through multiple chapters in one sitting tends to produce a false sense of fluency that collapses the first time an unfamiliar index pattern appears in a paper or a codebase. The mathematics in chapters two and three especially rewards slow, deliberate reading, because index placement errors made early compound into serious confusion by the time covariant derivatives appear in chapter six.
The following checklist offers a practical way to gauge readiness to move from one part of the book to the next, since the chapters are structured to build cumulatively rather than as independent modules.
Readiness check before advancing chapters
- Can rewrite a nested summation expression using the Einstein summation convention without hesitation
- Can identify whether a given index in a chemistry equation is covariant or contravariant and explain why
- Can perform a basis transformation on a small matrix by hand using a change-of-basis matrix
- Can name the rank of at least five familiar chemistry objects (density matrix, dipole moment, overlap matrix, and others)
- Can explain, in one sentence, what a tensor contraction does to the total number of free indices
Every worked example in this book uses chemistry systems small enough to check by hand or with a short script, typically the hydrogen molecule, water, or a minimal-basis diatomic, rather than large systems that hide the mathematics behind computational scale. This choice is deliberate. The goal at every stage is to see every index and every summation explicitly at least once before trusting a library function to handle it silently. Once that trust is earned through hand verification, later chapters shift toward showing how the same operations appear inside real code using libraries like NumPy, where the tensor contraction that took several lines by hand becomes a single call to an einsum function.
Code examples appear starting in the chapter on tensor contraction and become more frequent through the remaining chapters, always in a form that runs without requiring specialized quantum chemistry software, using small hand-constructed matrices and tensors rather than output from an external package. This keeps the mathematics visible and separates the conceptual content of tensor operations from the additional complexity of a full electronic structure code. Once the tensor operations themselves are second nature, applying them inside a real package like PySCF or Psi4 becomes a matter of locating the right function rather than relearning the underlying mathematics.
Notation is kept consistent throughout the book precisely so that a symbol learned in chapter one means the same thing in chapter eleven. A lowercase Latin index like i or j always ranges over a discrete, finite set such as basis functions or orbitals, while a Greek index like μ or ν is reserved, following common quantum chemistry convention, for atomic orbital basis functions specifically, distinguishing them from molecular orbital indices. This convention matches the notation used in most quantum chemistry textbooks and research papers, so fluency built here transfers directly to outside reading rather than requiring a second translation step.
Anyone who finds a particular subchapter too fast or too slow should treat that as useful information about their own background rather than a flaw in the book's structure, since the intended reader profile spans a wide range of prior exposure to formal mathematics. A chemist who studied tensor notation briefly in a graduate mathematical methods course may move quickly through the first three chapters and slow down considerably at the Hartree-Fock and bond order chapters, where the chemistry-specific tensor objects appear. A chemist coming from a more applied or experimental background may need the opposite pacing. Both paths are accounted for in how the material is sequenced.
Mathematical Prerequisites and Review
This book assumes comfort with the linear algebra covered in a standard undergraduate physical chemistry curriculum: matrix multiplication, matrix inversion, eigenvalues and eigenvectors, and the idea of a vector space with a chosen basis. It does not assume any prior exposure to formal tensor notation, index gymnastics, or differential geometry, and it does not assume familiarity with the Einstein summation convention, since that convention gets introduced carefully from scratch in the very next chapter. Anyone who has diagonalized a Fock matrix to obtain molecular orbital energies has already used every piece of linear algebra this book needs as a starting point.
A few specific pieces of that linear algebra deserve a quick refresh before moving forward, because the tensor framework relies on precise, careful use of them rather than the somewhat looser use common in applied chemistry courses. The first is the distinction between a matrix and the linear map it represents. The same linear map, when represented in different bases, is described by different matrices related by a similarity transformation, and this distinction between "the map" and "its matrix in a given basis" is exactly the seed from which the covariant and contravariant index distinction grows in chapter three.
The second piece worth refreshing is eigenvalue decomposition, since it reappears constantly from the secular equation in Hartree-Fock theory through to iterative diagonalization algorithms used in large-scale computational chemistry codes. Given a symmetric matrix A, the eigenvalue equation Av = λv finds vectors v that are only scaled, not rotated, by the linear map. In quantum chemistry, this equation appears directly as the secular equation that determines molecular orbital energies and coefficients from the Fock matrix, and it will reappear in tensor form in the chapter on eigenvalue problems in quantum chemistry, where the same equation gets written using index notation rather than bold matrix symbols.
A third prerequisite, less commonly emphasized in chemistry training but essential here, is basic multivariable calculus: partial derivatives, the chain rule applied to a function of several variables, and a working sense of what a gradient represents geometrically. The chapter on tensor calculus and derivatives extends ordinary partial differentiation to objects that live on curved or curvilinear coordinate systems, and that extension only makes sense once ordinary partial differentiation in Cartesian coordinates is completely solid. A chemist who last used the multivariable chain rule during a physical chemistry thermodynamics course should expect to spend extra time on that chapter.
Matrix transpose and matrix inverse operations, along with the specific properties of orthogonal and unitary matrices, come up repeatedly once basis transformations enter the picture starting in chapter four. An orthogonal matrix, one whose transpose equals its inverse, describes a change of basis that preserves lengths and angles, exactly the kind of transformation used when moving between orthonormal molecular orbital bases. Recognizing when a change-of-basis matrix is orthogonal versus merely invertible turns out to matter a great deal for deciding whether covariant and contravariant components coincide or differ, a subtlety examined directly in chapter three.
The following short quiz offers a quick, low-stakes way to check whether these prerequisites are solid before moving into chapter one, since gaps here tend to surface as confusion three or four chapters later rather than immediately.
Quiz: Prerequisite self-check
If matrix A has eigenvalue λ with eigenvector v, what does Av equal?
The eigenvalue equation Av = λv means the linear map A only rescales v by the factor λ, without changing its direction.
A matrix whose transpose equals its inverse is called:
An orthogonal matrix satisfies Aᵗ = A⁻¹, and such matrices describe basis changes that preserve lengths and angles.
In quantum chemistry, the secular equation used to find molecular orbital energies is fundamentally what kind of mathematical problem?
The secular equation determining molecular orbital coefficients and energies from the Fock matrix is an eigenvalue problem, covered again in tensor form in a later chapter.
Anyone who missed one of the quiz questions above should not treat that as a reason to set the book aside. Every one of the underlying ideas, eigenvalues, orthogonal matrices, the secular equation, gets revisited in more depth and with more chemistry context in the chapters where it actually gets used. The quiz exists to surface which specific piece of background might need a brief outside refresher, whether that means a quick look at a linear algebra textbook chapter on eigenvalues or a review of a physical chemistry textbook's treatment of the secular determinant.
What genuinely does not need review, because this book builds it from first principles, is any prior exposure to index notation itself. The habit of writing x, y, z or explicit summation signs runs deep after years of chemistry training, and unlearning it takes deliberate practice regardless of mathematical background. A physicist transitioning into computational chemistry and a chemist with no physics coursework at all tend to start chapter one at roughly the same level, because the notation is unfamiliar territory for almost everyone trained primarily in chemistry rather than in tensor-heavy fields like general relativity or continuum mechanics.
One additional mathematical object worth flagging now, without fully explaining it, is the metric tensor, since it appears repeatedly from chapter three onward and encodes how lengths and angles are measured in a given coordinate system. In the simplest Cartesian coordinate systems used throughout most of undergraduate chemistry, the metric tensor is just the identity, which is precisely why it never needed a name before. Once curvilinear coordinates or non-orthogonal basis sets enter the picture, as they do in some coordinate transformation problems and in non-orthogonal atomic orbital bases, the metric tensor stops being trivial and becomes the object responsible for correctly raising and lowering indices.
Nothing about these prerequisites requires a mathematics textbook sitting open alongside this one. Every piece of linear algebra and calculus referenced above is covered, at the level actually needed, inside the relevant later chapter, with a chemistry example attached. The purpose of this review is calibration, not gatekeeping: knowing in advance which pieces of background are assumed makes it far easier to recognize, three chapters from now, whether a moment of confusion comes from a genuinely new tensor concept or from a gap in earlier linear algebra that deserves a quick side review before continuing.
Notes
Introduction
- 1. Attila Szabo and Neil Ostlund, Modern Quantum Chemistry, McGraw-Hill, 1989
This is the end of the free sample. The full book has 11 chapters.
Want this book written for you?
Tell us your goals and background, and get your own version of this book, tailored by AI to you.
Benefits of AI-tailored books
- Read one book, not ten:
- all the Tensor Calculus knowledge you need, gathered into a single book.
- Save days of learning:
- tell us your goals, choose your topics, and the whole book is built around them.
- Learn effortlessly:
- Tensor Calculus book written for your specific background and expertise.
- Understand at a glance:
- includes charts, tables, timelines, checklists, decision trees, and more.
- Stay current:
- written the day you order it, not years ago.
- Trust what you read:
- every book is checked for accuracy, with real research when your subject needs it.
Create your unique book in 3 steps
- 1. Select your focus
Select the focus of your Tensor Calculus book and share your background
- 2. Personalize your book
Specify your goals and choose sub-topics to include
- 3. Get your tailored book
Your book is ready in 10 minutes. Read it online, download as EPUB or PDF, or send to Kindle.
Frequently asked questions
- What is TailoredRead?
TailoredRead creates complete, full-length nonfiction ebooks, written specifically for you. Tell us what you want to learn and why, and TailoredRead writes you a complete ebook on it, with charts, tables, and diagrams throughout. Read it online, on Kindle, or on any e-reader, or download it as a PDF or EPUB. Every book is written fresh the day you order it.
- How is the book tailored to me?
Before anything is written, you answer a few short questions about your goals, your background, and the topics you care about. Your book is then planned around your answers: written at your level, focused on your goals, and covering the topics you chose, instead of the one-size-fits-all book a store sells everyone.
- Will it read like generic AI content?
No. Your book isn't a chat transcript: it's planned chapter by chapter before a single word is written, told in a clear book voice, and explains ideas visually with charts, tables, and diagrams. After writing, every book goes through an editorial pass that polishes chapters so the book reads consistent from start to finish. Judge for yourself: browse thousands of sample books on our Explore Books page.
- How accurate is the content?
Our AI first checks whether your subject needs live research. Niche and fast-moving subjects are researched before writing, and the book plan and chapters are grounded in what it finds. After writing, every book goes through a quality pass that checks its facts and consistency, and researched books list their sources in a Notes section at the back.
- How long is the book?
You choose the length: Comprehensive (250-300 pages), Detailed (150-200 pages), Essential (70-100 pages), or Short (30-50 pages).
- Does the book include visuals?
Yes. Every book includes charts, tables, and diagrams: timelines, checklists, step-by-step guides, decision trees, comparison tables, matrices, and bar charts. A typical book includes dozens of these visual elements.
- Can I read it on Kindle? What formats can I download?
Yes. Every book can be read in our online reader or downloaded as a PDF or EPUB. The EPUB can be opened with Kindle, Apple Books, Kobo, and any e-reader. The Commercial and Author licenses also include an editable Word (DOCX) and Markdown download.
- How much does it cost?
About the price of a regular ebook. The exact price depends on your book's length and complexity, from $2 for the shortest books to $35 for the most comprehensive, and it's shown when you review your book, before you commit to anything. Each book is a one-time purchase, yours to keep, no subscription. Licenses that let you share, teach, or publish your book range from $35.99 to $49.99.
- Can I preview the book before purchasing?
Before you pay, you'll see what your book will cover: the title, a detailed description, the estimated length, and the complete chapter-by-chapter table of contents, so you know what you're getting before you decide. The full text itself is written after you purchase.
- How long does it take to create a book?
About 10 minutes. You can start reading the opening chapters while the rest is still being written.


