r/LinearAlgebra
Curl of a vector field is it a vector or a tensor?
Someone told me today that the curl of a vector field is a tensor, but till now I always thought it is a pseudo vector. Can someone explain?
Properties of the Parity Operator & Geometric Meaning of Eigenvalues
This material focuses not on pure linear algebra, but rather on its applications in engineering and quantum mechanics.
Geometrically, the meaning of an eigenvalue signifies the scaling (expansion or contraction) and occasionally the inversion of an invariant coordinate axis.
Decade-long project to fully gamify linear algebra used in Quantum Computing
Hi
If you are remotely interested in understanding what bits of linear algebra are used in defining the Gate model framework Quantum Computing, oh boy this is for you. I am the Dev behind Quantum Odyssey (AMA! I love taking qs) - worked on it for about 10 years (3+ during PhD, the visual method I developed ended up being my thesis, it is a complete Hilbert space visualizer), the goal was to make a super immersive space for anyone to learn quantum computing through zachlike (open-ended) logic puzzles and compete on leaderboards and lots of community made content on finding the most optimal quantum algorithms. The game has a unique set of visuals capable to represent any sort of quantum dynamics for any number of qubits and this is pretty much what makes it now possible for anybody 12yo+ to actually learn quantum logic without having to worry at all about the mathematics behind.
This is a game super different than what you'd normally expect in a programming/ logic puzzle game, so try it with an open mind.
Stuff you'll play & learn a ton about
- Boolean Logic – bits, operators (NAND, OR, XOR, AND…), and classical arithmetic (adders). Learn how these can combine to build anything classical. You will learn to port these to a quantum computer.
- Quantum Logic – qubits, the math behind them (linear algebra, SU(2), complex numbers), all Turing-complete gates (beyond Clifford set), and make tensors to evolve systems. Freely combine or create your own gates to build anything you can imagine using polar or complex numbers.
- Quantum Phenomena – storing and retrieving information in the X, Y, Z bases; superposition (pure and mixed states), interference, entanglement, the no-cloning rule, reversibility, and how the measurement basis changes what you see.
- Core Quantum Tricks – phase kickback, amplitude amplification, storing information in phase and retrieving it through interference, build custom gates and tensors, and define any entanglement scenario. (Control logic is handled separately from other gates.)
- Famous Quantum Algorithms – explore Deutsch–Jozsa, Grover’s search, quantum Fourier transforms, Bernstein–Vazirani, and more.
- Build & See Quantum Algorithms in Action – instead of just writing/ reading equations, make & watch algorithms unfold step by step so they become clear, visual, and unforgettable. Quantum Odyssey is built to grow into a full universal quantum computing learning platform. If a universal quantum computer can do it, we aim to bring it into the game, so your quantum journey never ends.
Nice to watch:
Khan academy style tutorials in qm/qc: https://www.youtube.com/@MackAttackx
Physics teacher stream with 400hs in https://www.twitch.tv/beardhero
Density Matrices! Explained Simply | Pure vs. Mixed States, Born Rule & Coherence
I made a short whiteboard video explaining density matrices from the ground up, focusing on the linear algebra behind them: pure vs. mixed states, diagonal vs. off-diagonal entries, coherence, projectors, and how measurement probabilities arise from the matrix representation.
Sharing in case it’s useful to anyone interested in how linear algebra shows up in quantum mechanics. Corrections or additional insight are always welcome.
Linear Algebra Visualiser 2.0
Hi guys,
Super excited about this update to Linear Algebra Visualiser - which now includes matrix composition, the ability to add a translation matrix and an expanded Step by Step explanation.
Have a look at the video above for a detailed demo!
PS: These new features are available as In App Purchases but you get 1 week as a free trail so you can always check it out and cancel if you are not happy.
PS 2: For people who were Beta Testers - I need some more time to setup the ability to give out offer codes (it’s all complicated with Apple).
Thank you all for your support, it means a lot!
Mac: https://apps.apple.com/gb/app/linear-algebra-visualizer/id6763524968
iOS/iPad: https://apps.apple.com/us/app/linear-algebra-visualizer/id6763524968
Web Demo: https://sockerjam.github.io/LinearAlgebraVisualizerWeb/
Inspired by u/LinearAlgebraWorld 's recent work on complex eigenvectors, I made a student-to-student guide for anyone that may need more foundational intuition before processing the full technical derivation.
Last three images of this post are GraphMath's work. Here is the link to their original post: https://www.reddit.com/r/LinearAlgebra/s/cdzAjKVtOc
My writing focuses on what eigenvectors are really telling us, why complex eigenvectors matter, and how one complex eigenvector can encode a two-dimensional, real invariant plane.
Vectors are scaled basis vectors
Hi everyone!
I wanted to share this quick thought that has really helped me with linear algebra;
Let's say: P = (1, 0)
This vector/point is simply the result of scaling the basis vectors ihat [1, 0] and jhat [0, 1]:
Now, if we apply a transformation to the basis vectors, let's say a 90 degree rotation, the same process applies. For example, after the transformations each basis vector lands at column, ihat [0, 1], jhat [-1, 0].
Scaling this with our vector, [1, 0] gives us [0, 1].
So, a transformation transforms the basis vectors and our vector scales it, that's it :)
Enjoy!
Playlist/teacher suggestion
Hii.
I'm having a hard time understanding the vectors in Liner Algebra.
Can you please suggest some good teacher or playlist or documentation or notes from where I can understand it completely.
Thanks.
Projection Matrix P^T = P - Intuitively
Hi math wizards i am not able to understand this part where transpose of projection matrix is equal to projection matrix. I do understand that why P^2 = P that 1st Projection puts it in C(A) and second projection where are projection a vector which is already in C(A) basically equal to the vector.
can you guys explain intuitively why P^T=P . Algebraically I can understand this symmetry arises for two projections to be orthogonal. but i need a intuitive understand can someone help
Made a video explaining why Spectral Gaps matter in Adiabatic Quantum Computing — The 1/Δ reduced resolvent bound
hey, i made a new video working through a proof involving the reduced resolvent and why the spectral gap matters so much in adiabatic quantum computing. the main idea is that the reduced resolvent has this inverse-gap behavior, roughly 1/Δ, so as the spectral gap gets smaller the resolvent norm grows and the error bound can get much worse.i go through the proof step by step and explain what the resolvent, spectral projections and operator norms are along the way, so hopefully it’s useful even if you haven’t seen all of the notation before.
What should I know when learning tensor decomposition methods?
Hi everyone! I’m relatively new to the field of tensor decomposition, and it’s going to be one of my research directions during my upcoming two-year master’s program.
So far, I’ve been reading about different tensor decomposition methods, such as PARAFAC/CP, Tucker, Tensor-Train, Tensor Ring, Tensor Wheel. I understand the basic intuition behind them, for example, what kind of components they decompose a tensor into, but my understanding is still mostly conceptual.
I’m wondering what I should learn beyond the basic intuition if I want to eventually do research on coupled tensor decomposition. More specifically:
- For each tensor decomposition method, what are the important things I should understand? Besides its basic structure and intuition, should I learn things like uniqueness/identifiability, approximation properties, computational complexity, rank properties, optimization formulations, convergence, etc.? How deeply should I understand each of these topics?
- How deeply should I study the algorithms used to compute these decompositions? There seem to be many algorithms for each model, such as ALS, SVD-based methods, alternating optimization, gradient-based methods, etc. Which algorithms are fundamental enough that I should understand first? Do I need to understand the derivation and implementation of these algorithms, or is understanding the general idea enough at the beginning?
- What mathematical background is most important? For example, should I focus more on linear algebra, multilinear algebra, numerical optimization, matrix/tensor calculus, numerical analysis, or something else?
- What would be a good learning path toward coupled tensor decomposition? Should I thoroughly study CP/Tucker first before moving to coupled models, or is it reasonable to start looking at coupled decompositions relatively early?
- How do you deal with theorems and proofs when reading tensor decomposition papers? When reading papers, do you usually try to re-prove the theorems, lemmas, propositions, and corollaries yourself to make sure you understand them, or do you mostly focus on understanding the main ideas and skip the detailed proofs unless they are directly relevant to your research? I’m especially unsure about this part because I sometimes spend a lot of time trying to reproduce every proof. I’m not sure whether this is a good use of time when learning a new field, or whether working through the proofs is actually important for building the mathematical foundation needed for research.
Any recommended textbooks, lecture notes, surveys, or papers that could provide a good learning path would also be greatly appreciated.
Thank you so much!
Vectors, basis, and transformations - manic
manic is a tiny language for making animations. You write a short text file; manic renders a smooth, glowing video. No timeline scrubbing, no keyframes by hand — you describe what’s on screen and when things happen, and the engine does the rest, deterministically.
Manic Animation code
// ============================================================================
// Essence of Linear Algebra, chapters 1→2→3 in one arc.
//
// Ch1 A vector is an arrow from the origin; its coordinates are [x, y].
// Ch2 Those coordinates are SCALARS: v = x·î + y·ĵ — a linear combination of
// the basis vectors î=(1,0), ĵ=(0,1).
// Ch3 A matrix is a transformation: it says where î and ĵ LAND, and the whole
// grid morphs to follow (`gridmap` animates it). Because v = x·î + y·ĵ,
// it rides along, landing at x·(new î) + y·(new ĵ).
//
// Example: v = [1, 2] under [[2,1],[1,2]] (î→(2,1), ĵ→(1,2)), so v lands at
// 1·(2,1) + 2·(1,2) = (4,5). Origin (400,470), 55 px/unit.
// ============================================================================
title("Vectors, basis, and transformations");
canvas(1280, 720);
template("black");
text(narr, (640, 696), "A vector is an arrow from the origin.", 24);
// the plane + basis, ready to be transformed in Ch3 (starts at the identity)
gridmap(gm, (400, 470), 55, 2, 1, 1, 2, 5);
// the vector v = [1,2] and its linear-combination scaffold
vector(v, (400, 470), (55, 110), yellow);
vector(jj, (455, 470), (0, 110), red); // 2·j-hat, stacked on i-hat → reaches v
equation(vlab, (486, 352), `\vec{v}=[1,2]`, 30); color(vlab, yellow);
equation(ilab, (472, 500), `\hat{\imath}`, 26); color(ilab, lime);
equation(jlab, (366, 414), `\hat{\jmath}`, 26); color(jlab, red);
equation(mtx, (980, 165), `\begin{bmatrix}2&1\\1&2\end{bmatrix}`, 44);
// Ch4 — a second transform (90° rotation) composed on top: morph M1 → M2·M1
gridmap(gm2, (400, 470), 55, -1, -2, 2, 1, 5, 2, 1, 1, 2);
equation(comp4, (640, 96), `\begin{bmatrix}0&-1\\1&0\end{bmatrix}\begin{bmatrix}2&1\\1&2\end{bmatrix}=\begin{bmatrix}-1&-2\\2&1\end{bmatrix}`, 34);
// the determinant cell (Ch5), the projection (Ch7), and the alt-basis grid (Ch8)
determinant(dt, (400, 470), 55, 2, 1, 1, 2, gold);
project(pr, (400, 470), 55, (1, 2), (3, 1)); // project v=(1,2) onto span(w=(3,1))
squish(sq, (400, 470), 55, 1, 2, 5); // Ch7 duality: dot with v = squish onto a line
eigen(ev, (400, 470), 55, 2, 1, 1, 2, gold); // Ch9 eigenvectors of [[2,1],[1,2]] (λ = 3, 1)
diagonalise(dg, (400, 470), 55, 2, 1, 1, 2, gold); // Ch10 eigenbasis = a pure stretch
coords(cf, (700, 450), (-4, 4), (-3, 3), 46, 46, 0); // Ch11 a function graph…
plot(fn, (700, 450), 46, 46, "0.25*x*x*x - x", (-3.6, 3.6)); color(fn, mint);
equation(deq, (700, 130), `\tfrac{d}{dx}\;\leftrightarrow\;\begin{bmatrix}0&1&0\\0&0&2\\0&0&0\end{bmatrix}`, 32);
gridmap(cb, (400, 470), 55, 1, 0.7, 0.4, 1, 5);
vector(vb, (400, 470), (55, 110), yellow);
// --- initial visibility ---
hidden(gm.i); hidden(gm.j); // basis revealed in Ch2
hidden(v); hidden(vlab); hidden(jj); hidden(ilab); hidden(jlab); hidden(mtx);
hidden(dt); hidden(dt.unit); hidden(dt.val); hidden(pr);
hidden(sq); hidden(sq.line); hidden(sq.dual);
hidden(ev); hidden(dg); hidden(cf); hidden(fn); hidden(deq);
hidden(gm2); hidden(gm2.bg); hidden(gm2.i); hidden(gm2.j); hidden(comp4);
hidden(cb); hidden(cb.bg); hidden(cb.i); hidden(cb.j); hidden(vb);
// --- Ch1: a vector ---
wait(0.5);
par { show(v); show(vlab); }
wait(1.3);
// --- Ch2: coordinates are a linear combination of the basis ---
say(narr, "Its coordinates are scalars: v = 1·i-hat + 2·j-hat.");
par { show(gm.i); show(gm.j); show(ilab); show(jlab); }
wait(0.7);
show(jj); // i-hat then two j-hats reach v
wait(1.6);
// --- Ch3: the matrix transforms space; v rides along ---
say(narr, "A matrix moves i-hat and j-hat — and the whole grid follows.");
show(mtx);
par { fade(jj); fade(ilab); fade(jlab); fade(vlab); }
par { to(gm, morph, 1, 2.2); grow(v, (620, 195), 2.2); } // space deforms, v follows
wait(0.6);
say(narr, "v lands at 1·(new i-hat) + 2·(new j-hat) = (4,5).");
wait(1.6);
// --- Ch4: matrix multiplication is composition ---
say(narr, "Ch 4 — apply one transform, then another: that is matrix multiplication.");
show(comp4); // the product, clearly placed up top
par { fade(gm); fade(v); }
show(gm2); // starts at M1 (seamless with Ch3)
to(gm2, morph, 1, 1.8); // now rotate 90°: the grid is at M2·M1
wait(1.3);
to(gm2, morph, 0, 1.5); // undo the second transform, back to M1
par { fade(gm2); fade(comp4); }
par { show(gm); show(v); }
wait(0.6);
// --- Ch5: the determinant is the area scale factor ---
say(narr, "Ch 5 — the determinant is how much areas scale: 2·2 − 1·1 = 3.");
par { show(dt); show(dt.unit); show(dt.val); }
wait(1.9);
par { fade(dt); fade(dt.unit); fade(dt.val); } // fade = timeline hide (hidden is base-state only)
// --- Ch6: column space + the inverse undoes the transform ---
say(narr, "Ch 6 — the columns span the whole plane, so the inverse sends space back.");
par { to(gm, morph, 0, 1.8); grow(v, (455, 360), 1.8); } // reverse the morph = the inverse
wait(1.4);
// --- Ch7: the dot product — projection, and its dual (a squish onto a line) ---
say(narr, "Ch 7 — the dot product of v and w is a projection — w's shadow on v.");
par { fade(gm); fade(gm.bg); fade(v); fade(mtx); }
show(pr);
wait(1.6);
say(narr, "It's also a squish of the whole plane onto a line — the dual vector IS v.");
fade(pr);
par { show(sq); show(sq.line); show(sq.dual); }
to(sq, morph, 1, 1.9); // collapse space onto the number line
wait(1.0);
to(sq, morph, 0, 1.2); // and back — the dual vector remains
wait(0.8);
// --- Ch8: change of basis ---
say(narr, "Ch 8 — change of basis: the same arrow, read on a different grid.");
par { fade(sq); fade(sq.line); fade(sq.dual); }
par { show(cb); show(vb); }
to(cb, morph, 1, 1.8); // the coordinate grid changes; v stays put
wait(1.8);
// --- Ch9: eigenvectors and eigenvalues ---
say(narr, "Ch 9 — some vectors keep to their own line: eigenvectors (λ = 3 and λ = 1).");
par { fade(cb); fade(vb); }
show(ev);
wait(2.0);
// --- Ch10: the eigenbasis is a pure stretch ---
say(narr, "Ch 10 — in the eigenbasis, the transformation is just a diagonal stretch.");
fade(ev);
show(dg);
wait(2.0);
// --- Ch11: abstract vector spaces ---
say(narr, "Ch 11 — even functions are vectors; the derivative is a linear map with a matrix.");
fade(dg);
par { show(cf); show(fn); show(deq); }
wait(2.2);
How much you rate this rigurous linear algebra textbook?
Hello, I was looking for a linear algebra and found this one:
Linear Algebra for Scientists - Lukas
It seems that it can be used as a first rigurous exposition to the topic. What do you think about it?
Learning Linear Algebra from Sheldon Axler's "Linear algebra done right". Is it a right choice ?
Complex eigenvectors of a rotation-scaling matrix: a special case
This is a follow-up to our previous post on how the choice of free variable changes the real and imaginary parts of a complex eigenvector:
For a general 2×2 real matrix with complex eigenvalues, changing the phase of the free variable rotates and scales the pair Re(x̃₁), Im(x̃₁) through a matrix-transformation ellipse.
Here we look at the special case where the original matrix itself is a rotation-scaling matrix.
In this case, for every nonzero choice of the free variable, Re(x̃₁) and Im(x̃₁) remain perpendicular and equal in length. The numerical examples at the bottom show the same phase experiment as in the previous post, but now the ellipse becomes a circle.
This is the next page of the chapter on complex eigenvectors and the rotation-scaling theorem. More to follow.
Complex eigenvectors of a rotation-scaling matrix: a special case
This is a follow-up to our previous post on how the choice of free variable changes the real and imaginary parts of a complex eigenvector:
For a general 2×2 real matrix with complex eigenvalues, changing the phase of the free variable rotates and scales the pair Re(x̃₁), Im(x̃₁) through a matrix-transformation ellipse.
Here we look at the special case where the matrix itself is a rotation-scaling matrix.
In this case, for every nonzero choice of the free variable, Re(x̃₁) and Im(x̃₁) remain perpendicular and equal in length. The numerical examples show the same phase experiment as in the previous post, but now the ellipse becomes a circle.
Thanks to u/StanleyDodds for pointing out an unnecessary detour in the previous version. We have corrected and simplified it here.
This is the next page of the chapter on complex eigenvectors and the rotation-scaling theorem. More to follow.
Gilbert Strang or Sheldon Axler
I had studied some linear algebra (maybe 2-3 semesters) in engineering college about a decade ago. I'm now starting to get back into math, with the goal of studying/understanding ML theory/research.
The standard advice is to start with Gilbert Strang (linear algebra and its applications) and then, optionally, do the Axler book. While reading Strang, i find it to be a cleaner and deeper exposition of topics i already vaguely remember. Axler, i find more novel and interesting, and kinda fresh.
Can I read them both in parallel? Is that too inefficient? Can you please suggest a good path based on my background and interests.
The Fourier Transform as a Change of Basis in Quantum Mechanics
This material is not the pure linear algebra or functional analysis covered in mathematics departments. It is applied material utilized in engineering and quantum mechanics.
We will also cover the inverse Fourier transform, which localizes position by extending a finite-dimensional vector space to an infinite-dimensional vector space and summing an infinite number of momentum bases.
my new video on why QEC syndromes add mod 2. if you’re new to quantum error correction, I explain everything from the ground up!
I was working through this proof and thought it was a really interesting way to introduce some of the algebra behind quantum error correction. I go through why QEC syndromes add modulo 2 and why the syndrome map is a homomorphism from the Pauli group into a binary vector space.
Along the way I also cover stabilizer generators, F₂, zero syndromes, the kernel and normalizer, and briefly connect the ideas to surface codes and decoding.
If you’re newer to quantum error correction, I tried to build everything from the ground up and explain the notation before getting into the proof. Would love any feedback or discussion.