Find a quadratic polynomial $p(x)$ such that $p(-1) = 0$, $p(1) = 0$ and $p'(0) = 0$.
Let $p(x) = a x^2 + b x + c$
Then we have to solve the following equations
$$a - b + c = 0\\ a + b + c =0\\ 0 + b + 0 = 0$$To solve this linear system we perform row operations:
$$\begin{array}{cccc} a - b + c = 0 & &a - b + c = 0\\ a + b + c =0 & R_2 \leftarrow R_2- R_1 &0 + 2b + 0 =0\\ 0 + b + 0 = 0 && 0 + b + 0 = 0\\ \end{array}$$The row operation $R_2 \leftarrow R_2- R_1 $ states that we should subtract row 1 from row 2, and put whatever we find in row 2.
The last two equations give $b = 0$, and then the top equation gives $c = -a$. So, letting $a = \alpha \in \mathbb R$, the polynomial $p(x)$ is given by:
$$ p(x) = \alpha(x^2 -1).$$We develop the proper definitions so that we can write the above system in matrix form as
$$\begin{bmatrix} 1 & -1 & 1\\ 1 & 1 & 1 \\ 0 & 1 & 0 \end{bmatrix}\begin{bmatrix} a \\ b \\ c \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}$$A matrix is an $n \times m$ array of real (or complex) numbers, where ordering matters. Here $n$ refers to the number of rows in the matrix and $m$ is the number of columns.
For an $n \times m$ matrix $A$ we use $a_{ij}$ to refer to the element that is in the $i$th row and $j$th column. Rows and columns are counted from the top left entry. We use the notation
$$A = (a_{ij})_{1 \leq i \leq n, 1 \leq j \leq m}$$to refer to the the matrix $A$ by its entires. We also use $A = (a_{ij})$ when $n$ and $m$ are implied.
The diagonal entries of a matrix $A$ are $a_{ii}$ for $1 \leq i \leq \min\{m,n\}$.
A matrix $A$ is triangular if either $a_{ij} = 0$ for $i < j$ (lower triangular) or $a_{ij} = 0$ for $j < i$ (upper triangular). If a matrix is both lower and upper triangular it is said to be diagonal.
A column vector is an $n \times 1$ matrix.
A row vector is an $1 \times m$ matrix.
If $x$ is is either a row or column vector, we use $x_i$ ($1 \leq i \leq n$ or $1 \leq i \leq m$, resp.) to refer to its entries.
Let $A = (a_{ij})$ be an $n \times m$ matrix and let $x$ be a $m \times 1$ column vector. The product $y = Ax$ is a $n \times 1$ vector $y$ given by
$$ y_i = \sum_{j=1}^m a_{ij} x_j, \quad 1 \leq i \leq n.$$With this notation, the following linear system of equations
$$a_{11} x_1 + a_{12} x_2 + \cdots + a_{1n} x_n = y_1\\ a_{21} x_1 + a_{22} x_2 + \cdots + a_{2n} x_n = y_2\\ \vdots ~~~~~~~~~~~~~~~ \vdots\\ a_{n1} x_1 + a_{n2} x_2 + \cdots + a_{nn} x_n = y_n$$is equivalent to $Ax = y$
numpy
¶import numpy as np
A = np.array([[1,2,3], [4,5,6]])
print 'A = '
print A
A = [[1 2 3] [4 5 6]]
x = np.array([[1], [1], [1]])
print 'x = '
print x
x = [[1] [1] [1]]
print 'Ax = '
print np.dot(A, x)
Ax = [[ 6] [15]]
The goal of Gaussian elimination is to solve a system of equations by performing what are called elementary row operations to reduce a general matrix to an upper-triangular matrix. Then a procedure called backward substitution applies to the upper-triangular matrix.
Elementary row operations are: