# Wk4

## **Introduction: Einstein summation convention and the symmetry of the dot product**

$$
AB = C \newline
C\_{ik} = a\_{ij}b\_{jk}
$$

Multiplying a 2x3 matrix with a 3x4 matrix results in a 2x4 matrix; by first row times each columns&#x20;

$$
\begin{pmatrix}u\_i\\\vdots\end{pmatrix}\cdot\begin{pmatrix}v\_i\\\vdots\end{pmatrix}
$$

$$
\[u\_1 u\_2 ... u\_n]\begin{bmatrix}v\_1\v\_2\\\vdots\v\_n\end{bmatrix}
$$

$$
\begin{pmatrix}a\_{11} \cdots a\_{1n}\\\vdots\a\_{n1} \cdots a\_{nn}\end{pmatrix} \begin{pmatrix}b\_{11} \cdots b\_{1n}\\\vdots\b\_{n1} \cdots b\_{nn}\end{pmatrix}
$$

$$
(ab)*{23} = a*{21}b\_{13} + a\_{22}b\_{23} + \cdots + a\_{2n}b\_{n3} \newline
ab\_{ik} = \sum\_{j} a\_{ij}b\_{jk} = a\_{ij}b\_{jk}
$$

## Matrices changing basis

![](/files/-LkAyv51-sYbc0Clpi0m)

![](/files/-LkBVBPUsrd8S7TvcupS)

NOTE: Projection only works if orthogonal unit space

### **Doing a transformation in a changed basis**&#x20;

Bears basis had a first axis of three, one and a second axis of one, one. Let's say I have a vector x, y defined in bears basis. As I want to transform it by doing something like a rotation of 45 degrees.

![](/files/-LkBWZyj8e1RYkzZiGbr)

![](/files/-LkBZFEPDVyB-9bgFnxy)

$$
\frac{1}{\sqrt{2}} \begin{pmatrix} 1 & -1 \ 1 & 1 \end{pmatrix}
$$

## **Orthogonal matrices**

$$
A\_{ij}^T = A\_{ji}
\newline
\begin{pmatrix} 1 & 2 \ 3 & 4 \end{pmatrix}^T = \begin{pmatrix} 1 & 3 \ 2 & 4 \end{pmatrix}
$$

![](/files/-LkBbXUSxesLfQRgk_uZ)

## **The Gram–Schmidt process**

![](/files/-LkBdIDrWH3HUaZsgxZc)

## **Example: Reflecting in a plane**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://stephanosterburg.gitbook.io/scrapbook/math/math-for-ml/linear-algebra/wk4.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
