vector-spaces
Scannednpx machina-cli add skill parcadei/Continuous-Claude-v3/vector-spaces --openclawVector Spaces
When to Use
Use this skill when working on vector-spaces problems in linear algebra.
Decision Tree
-
Check Subspace
- Contains zero vector?
- Closed under addition?
- Closed under scalar multiplication?
- Verify with
z3_solve.py prove
-
Linear Independence
- Set up Ax = 0 where columns are vectors
sympy_compute.py nullspace "A"- Trivial nullspace = independent
-
Basis and Dimension
- Find spanning set, remove dependent vectors
sympy_compute.py rref "A"to find pivot columns- Dimension = number of pivots
-
Change of Basis
- Find transition matrix P
- New coords = P^(-1) * old coords
sympy_compute.py inverse "P"
Tool Commands
Sympy_Nullspace
uv run python -m runtime.harness scripts/sympy_compute.py nullspace "[[1,2,3],[4,5,6]]"
Sympy_Rref
uv run python -m runtime.harness scripts/sympy_compute.py rref "[[1,2,3],[4,5,6]]"
Z3_Prove
uv run python -m runtime.harness scripts/z3_solve.py prove "subspace_closed"
Cognitive Tools Reference
See .claude/skills/math-mode/SKILL.md for full tool documentation.
Source
git clone https://github.com/parcadei/Continuous-Claude-v3/blob/main/.claude/skills/math/linear-algebra/vector-spaces/SKILL.mdView on GitHub Overview
This skill guides you through core vector-space tasks in linear algebra. It covers checking subspace properties, testing linear independence, finding a basis and dimension, and performing a change of basis, using automated tools when appropriate.
How This Skill Works
It follows a decision-tree workflow: first verify a subspace (zero vector, closure) using a solver if needed; then test linear independence by solving Ax=0 and inspecting the nullspace; next obtain a basis and dimension by reducing A with rref and counting pivots; finally, perform a change of basis by constructing a transition matrix P and transforming coordinates with P^-1.
When to Use It
- You need to verify a subset forms a subspace (zero vector, closure under addition and scalar multiplication).
- You want to test if vectors are linear independent via Ax = 0 and the nullspace.
- You must find a basis and the dimension by reducing to row echelon form and counting pivots.
- You need a change of basis: compute a transition matrix P and transform coordinates.
- You want to automate checks with the provided tool commands (Sympy and Z3) to prove properties.
Quick Start
- Step 1: Decide whether your problem is about subspace verification, independence, basis/dimension, or change of basis.
- Step 2: Apply the appropriate tool: use nullspace for independence, rref for basis/dimension, and compute P for change of basis; reference the commands in the Skill.
- Step 3: Interpret the results (basis vectors, dimension, or new coordinates) and, if needed, prove the conclusions with the provided solver.
Best Practices
- Explicitly check the subspace criteria (zero vector, closure under addition and scalar multiplication) and use Z3_Prove for automation when helpful.
- To test independence, set up Ax = 0 with the vectors as columns and examine the nullspace via Sympy_Nullspace.
- Use Sympy_Rref on the matrix to identify pivot columns, then deduce a basis and the dimension as the number of pivots.
- For a change of basis, compute the transition matrix P and verify coordinates by applying P^-1 to old coordinates.
- Leverage the tool commands consistently to reproduce and verify each step (nullspace, rref, prove) for reliability.
Example Use Cases
- Given vectors in R^3, determine whether their span is a subspace and identify a basis.
- Assess whether the column vectors of a 4x3 matrix are linearly independent by computing the nullspace.
- Find a basis and dimension for the column space of a matrix using rref and pivot columns.
- Compute coordinates of a vector in a new basis using a specified transition matrix P and P^-1.
- Use Z3 to automatically prove subspace closure properties for a custom problem in linear algebra.