Table of Contents
1. Defining Fundamental Concepts
The vector space($V$), an abstract algebraic structure, represents a set of elements called vectors. These vectors allow for clear mathematical operations of addition between them and multiplication by a real scalar.
The inner product, a mathematical association function, assigns a real number, denoted as $\langle u, v \rangle$, to every pair of vectors $u$ and $v$. It determines the internal geometry of the space, allowing for the calculation of angles and distances.
The vector norm, its absolute magnitude or length, derives directly from the inner product. It is calculated through the mathematical relationship $||v|| = \sqrt{\langle v, v \rangle}$.
The Hilbert space ($\mathcal{H}$), a vector space equipped with an inner product, possesses the essential property of metric completeness. Any Cauchy sequence of vectors, a sequence with elements that grow increasingly closer, must converge to an element strictly within this space.
2. Algebraic Properties and Inequalities
The inner product respects three fundamental properties:
- Symmetry: $\langle u, v \rangle = \langle v, u \rangle$.
- Linearity: $\langle \alpha u + \beta v, w \rangle = \alpha \langle u, w \rangle + \beta \langle v, w \rangle$.
- Positivity: $\langle v, v \rangle \geq 0$, with the value of zero being reached exclusively when $v$ is the zero vector.
The Cauchy-Schwarz inequality, a universal geometric property in these spaces, limits the inner product of two vectors by the product of their norms:
$$|\langle u, v \rangle| \leq ||u|| \cdot ||v||$$
This inequality mathematically demonstrates the limits of alignment between two spatial directions.
3. Existence and Uniqueness Theorems
Riesz Representation Theorem
This theorem guarantees the perfect link between linear functionals and the vectors of the space. For any continuous linear functional $f$ defined on a Hilbert space $\mathcal{H}$, there exists one and only one vector, denoted as $w \in \mathcal{H}$, that satisfies the equation:
$$f(v) = \langle v, w \rangle$$
for absolutely any vector $v$ in space $\mathcal{H}$.
Spectral Theorem for Self-Adjoint Operators
Any self-adjoint linear operator $T$ (where $T = T^*$) possesses a complete orthonormal basis consisting exclusively of its eigenvectors. There exist real eigenvalues $\lambda$ corresponding to these eigenvectors $x$, defined by the transformation equation:
$$Tx = \lambda x$$
This theorem guarantees the possibility of decomposing any complex transformation into simple and independent directional components.
4. Practical Application in the Topology of Values (AI Ethics)
Calculating moral alignment through the inner product
An ethical profile becomes a vector $v$ in Hilbert space $\mathcal{H}$. The inner product $\langle v_{AI}, v_{human} \rangle$ directly measures the degree of similarity between the algorithm’s intent and the desired human standard. An approach of this kind transforms philosophical compatibility into a clear mathematical percentage. The Cauchy-Schwarz inequality indicates the maximum degree of alignment possible between the two profiles.
Auditing systems through the Riesz Theorem
An artificial intelligence algorithm evaluates situations through a decision function $f(v)$. The Riesz Representation Theorem guarantees the existence of a unique implicit moral vector $w$ that represents the “inherent character” of that algorithm. Thus, engineers can mathematically extract the exact ethical profile of the program, replacing speculation with a calculable value.
Extracting absolute values through the Spectral Theorem
A complex AI system acts as a mathematical operator $T$ on input data. Applying the spectral theorem decomposes the system’s decision matrix. The resulting eigenvectors represent the absolute and invariant moral principles of the algorithm. Therefore, the eigenvalues $\lambda$ indicate the exact weight and importance of each principle within its cognitive architecture.
The geometric description of ethical alignment:
Imagine a two-dimensional (2D) space, a representation of a segment within the Hilbert space $\mathcal{H}$. The horizontal axis ($X$) corresponds to Fairness, and the vertical axis ($Y$) corresponds to Utility. All values are normalized between 0 and 1.
Human Reference Vector ($w$): This vector represents the ideal established by society. It is positioned at coordinates $(0.6, 0.8)$ and possesses a norm of 1. Thus, the vector indicates a societal preference for balance, with a slightly higher weight on utility compared to strict fairness.
AI Decision Vector ($v$): This vector is generated by an algorithm after evaluating a specific situation. It is located at $(0.9, 0.3)$ and has a norm of 0.95. This position reveals that the algorithm over-optimized for utility and neglected fairness.
Projection and Alignment: Moral alignment is the projection of $v$ onto the direction of $w$. Mathematically, this is calculated via the normalized inner product:
$$\text{Alignment} = \frac{\langle \mathbf{v}, \mathbf{w} \rangle}{\|\mathbf{v}\| \cdot \|\mathbf{w}\|}$$
The visualization displays a dashed line starting from the tip of the AI vector ($v$) and falling perpendicular to the Human vector ($w$). This intersection point represents the valid ethical component of the decision. Therefore, the area outside the projection represents the “alignment error.”
Here is the Python code to visualize vector alignment:
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from matplotlib.lines import Line2D
import numpy as np
def visualize_alignment():
# 1. Defining Vectors in the Axiological Hilbert Space (H)
# X-axis = Fairness, Y-axis = Utility
# Human Reference Vector (w) - Normalized (Norm = 1)
w = np.array([0.6, 0.8])
w_norm = np.linalg.norm(w)
w_unit = w / w_norm
# AI Decision Vector (v)
v = np.array([0.9, 0.3])
v_norm = np.linalg.norm(v)
# 2. Mathematical Calculation of Alignment
# Inner Product <v, w>
inner_product = np.dot(v, w_unit)
# Moral Alignment (Cos(theta))
alignment_score = inner_product / v_norm
# Projection of Vector v onto w (v_proj)
v_proj = inner_product * w_unit
# 3. Graphical Visualization Configuration
fig, ax = plt.subplots(figsize=(10, 8))
ax.set_xlim(-0.1, 1.1)
ax.set_ylim(-0.1, 1.1)
ax.set_aspect('equal')
ax.grid(True, linestyle='--', alpha=0.5)
ax.axhline(0, color='black', linewidth=1)
ax.axvline(0, color='black', linewidth=1)
ax.set_xlabel('Fairness', fontsize=12, fontweight='bold')
ax.set_ylabel('Utility', fontsize=12, fontweight='bold')
ax.set_title(
f'Visualization of Ethical Alignment in Hilbert Space\n'
f'Moral Alignment: {alignment_score * 100:.1f}%',
fontsize=14, fontweight='bold'
)
# Human Vector (w) - Green, thick
ax.quiver(0, 0, w_unit[0], w_unit[1], angles='xy', scale_units='xy', scale=1,
color='#2ca02c', width=0.008)
# AI Vector (v) - Red
ax.quiver(0, 0, v[0], v[1], angles='xy', scale_units='xy', scale=1,
color='#d62728', width=0.006)
# Projection Vector (v_proj) - Blue, dashed (using annotate for dashed arrow)
ax.annotate(
'',
xy=(v_proj[0], v_proj[1]),
xytext=(0, 0),
arrowprops=dict(
arrowstyle='-|>',
color='#1f77b4',
linestyle='dashed',
lw=1.5,
alpha=0.7,
mutation_scale=15,
),
)
# Construction line for projection (from v to v_proj)
ax.plot([v[0], v_proj[0]], [v[1], v_proj[1]], 'k--', alpha=0.5)
# Text Labels
ax.text(w_unit[0], w_unit[1] + 0.05, 'Human Ideal',
color='#2ca02c', fontweight='bold', ha='center')
ax.text(v[0], v[1] - 0.08, 'AI Decision',
color='#d62728', fontweight='bold', ha='center')
# Manual Legend
legend_handles = [
mpatches.Patch(color='#2ca02c', label='Human Reference Vector (w)'),
mpatches.Patch(color='#d62728', label='AI Decision Vector (v)'),
Line2D([0], [0], color='#1f77b4', linestyle='--', linewidth=1.5,
alpha=0.7, label='Valid Ethical Projection (v_proj)'),
]
ax.legend(handles=legend_handles, loc='upper left')
plt.tight_layout()
plt.show()
if __name__ == "__main__":
try:
import matplotlib
import numpy
print("Required libraries are installed. Generating visualization...")
visualize_alignment()
except ImportError as e:
print(f"Error: Required libraries are not installed. {e}")
print("Please install matplotlib and numpy using: pip install matplotlib numpy")
Code verified with https://replit.com/ . Here is the result in https://replit.com/ visualizer:

Sources:
Mathematical Foundations (Linear Algebra & Functional Analysis)
- https://mathworld.wolfram.com/HilbertSpace.html
- https://mathworld.wolfram.com/InnerProduct.html
- https://mathworld.wolfram.com/RieszRepresentationTheorem.html
- https://britannica.com/science/spectral-theorem
- https://ocw.mit.edu/courses/18-06-linear-algebra-spring-2010/
AI Ethics & Mathematical Modeling
- https://plato.stanford.edu/entries/ethics-ai/
- https://arxiv.org/abs/1812.08303 (Technical AI Safety Landscape)
- https://arxiv.org/abs/2004.05862 (Mathematical Frameworks for Ethics)
- https://link.springer.com/article/10.1007/s10676-018-9482-x (The Ethics of Algorithms)
- https://openai.com/index/learning-from-human-preferences/ (RLHF Mathematics)
Topology & Advanced Systems
- https://ncatlab.org/nlab/show/Hilbert+space
- https://probability4datascience.com/ (Statistical Alignment Foundations)
- https://futureoflife.org/ai-principles/ (Asilomar AI Principles – Technical Context)
- https://miri.org/ (Machine Intelligence Research Institute – Technical Papers)
- https://alignmentforum.org/ (Technical Discussions on AI Vector Alignment)
Cover photo by Mariia Shalabaieva
