# Quadratic Form A **quadratic form** can be thought of as a function that handles multi-dimensional squaring. For example, say we have a single dimension, $x_1$. It's quadratic form would be: $Q(x_1) = ax_1^2$ Now let us be operating in a two dimensional space $[x_1, x_2]$. It's quadratic form would be: $Q(x_1, x_2) = ax_1^2 + bx_2 ^2 + cx_1x_2$ Notice that the quadratic form has different *expressions* that have their own coefficients. We can rewrite this via [Linear Algebra](Linear%20Algebra.md) as follows: $ \mathbf{x} = \begin{bmatrix} x_{1} \\ x_{2} \\ \end{bmatrix} $ $ A = \begin{bmatrix} a_{11} \; a_{12} \\ a_{21} \; a_{22} \\ \end{bmatrix} $ $Q(\mathbf{x}) = \mathbf{x}^T A \mathbf{x}$ And this can of course extend into higher dimensions. Again, the big idea here is that this is meant to generalize the concept of squaring to higher dimensions. Note that squaring is a [*Function*](Function.md). It takes in a number and returns a number. Just as a [Linear Transformations](Linear%20Transformations.md) is a function that is controlled by a single parameter, $m$ below: $y = mx$ The same applies to squaring - if we square a single variable, it can be altered via a single parameter: $y = m x^2$ Visually this will just yield a parabola whose curvature is controlled by $m$: ![center | 500](Pasted%20image%2020241010145353.png) Now, we certainly would like to be able to extend this to higher dimensions - and that is exactly what the **quadratic form** does! We can think of it as a multidimensional quadratic function. And we can see how $A$ now simply takes on the role of $m$: ![](Pasted%20image%2020241010145502.png)Notice that $A$ has entries that control $x_1^2$ and $x_2^2$ ($a_{11}, a_{22}$ respectively), as well as entries that control how $x_1$ and $x_2$ *jointly contribute* to the value of the quadratic form. The general idea though is that the quadratic form is *entirely composed* by expressions that are *quadratic*: meaning two variables multiplied together. This is actually worth noting: the term "*quadratic*" extends to any expression where the sum of the exponents of the variables in each term is *two*. This of course includes squared terms *as well as cross terms*. ### Technical Definition A function $F(x): \mathbb{R}^n \rightarrow \mathbb{R}$ is called a **quadratic form** if it can be written as $F(x) = x^T A x$, where $A$ is a symmetric $n \times n$ matrix. ### Example: $A$ is the Identity Matrix As a basic example we can let $A$ be the identity matrix, $I$, and we then have: $F(x) = x^T I x = ||x||^2 = x_1^2 + \dots + x_n^2$ Which is quite simply the length of $x^2$. ### Example: ### Connection between Quadratic form and $A$ ![Connection between symmetric matrix and quadratic form|500](Screen%20Shot%202021-12-13%20at%207.40.47%20AM.png) ![Connection between symmetric matrix and quadratic form|500](Screen%20Shot%202021-12-13%20at%207.41.40%20AM.png) ![Connection between symmetric matrix and quadratic form|500](Screen%20Shot%202021-12-13%20at%207.43.34%20AM.png) --- Date: 20211213 Links to: Tags: References: * [Quadratic Forms youtube video, TU Delft](https://www.youtube.com/watch?v=uwYeThQ8xSY) * [Quadratic Forms youtube, DR Peyam](https://www.youtube.com/watch?v=z_KUxDNHnF4)