So what kind of basis functions can we use to actually solve our static finite element problem? Now, the classic finite element solution schemes are based on approximating the function inside the element using linear functions. Now, here's an example of an arbitrary function defined over X in space. Let us divide that space into some, at the moment regular intervals and these are our elements. Now, inside these elements, keeping basically the boundary values following the function, we are defining now linear functions that approximate the function inside all of these separate elements. Now, how can we achieve that? Remember the concept of cardinal functions that we encountered when introducing the pseudo-spectral method. They used to be functions that were one at a certain grid point and zero, everywhere else. Now, here's some examples again and now we're actually connecting the points where the value of the function is one with the other point where the function is zero looks like a hat. Actually, these will be the basis functions that we will use to describe our arbitrary function. You can easily imagine that. Then basically, we can approximate any discrete function where we know the values at these discrete points, which are the element boundaries using these so-called cardinal functions or basis functions. So, how do you do this mathematically? Here's the equation that actually solves our problem. Now, phi I of X are the basis functions defined on the right-hand side and we see actually X_i will be the spatial points, i at the left boundary of element i, and i plus one then would correspond to X_i plus one would correspond to the right side of the elements or the right boundary. So, with this description, with this mathematical description, we can formulate so-called linear basis functions with which we later we'll describe or approximate our actual solution. Now, these basis functions are the complete set of basis functions is given here, shown here in the graph with an example of nine elements. That means we have actually 10 points because the last element also of course has a point at the right side so this will be the domain boundaries. You can see that i here goes from one to N, N equals 10. You can nicely see now the whole set of basis functions with which we will approximate our solution U, the displacement that we are actually seeking in our static system. Now, this is essential. These kind of basis functions are the one of the most important ingredients of all finite elements, linear finite, classic finite element type techniques and there's a big difference. Now to the finite difference method, at least conceptually. Here, we actually approximate the function everywhere even in between the grid points which are actually the element boundaries. Remember at the finite difference method, we basically never thought about what is the solution. In-between the grid points, we only considered the grid points at the boundaries. The solution is actually almost identical, but from a philosophical point of view, it's very different. Here, we approximate the function on the entire domain. Let's continue to develop the solution strategy for our finite element problem. We have a look again at the weak form of the equation where we see that we have an a sum over the basis functions basically inside our integrals. Now, we can actually take the sum out of the integral. Now, something interesting happens, you might see this already if you look at the index notation. We can actually write this system in matrix form and that's really cool. So, what are the matrix and vectors that are in this weak form. First of all, we have the unknown solution, the unknown U. The displacement here, U_i which is simply, it's basically the coefficients of the basis functions that we are going to seek. Secondly, we look at the right-hand side of the weak form of the equation. That's basically the force terms. These are now integrals over the basic forces F, multiplying all these individual basis functions. The F actually could be considered as a continuous function, but in fact in practice, it's usually a force that's acting at an element boundary. The third one is actually integrals over derivatives of the basis functions and that's called the stiffness matrix K, K_ij or written in boldface as in matrix form. You can see here the form with the integrals. Now, where does the word stiffness come from? We actually to keep it really simple, we take mu or Shear modulus which is basically the stiffness of our material out of the integral just to keep it simple. But this is actually, if you think of what we said in the very first lecture of this week, comes from engineering. Buildings are of course characterized by the stiffness properties, and this is why in the finite element terminology, this matrix is actually called the stiffness matrix. Later, we're actually going to also learn the mass matrix if we look at the time-dependent problem. So now, let's write it in matrix form, is very simple. We have U_i multiplying K_ij equals F_j on the right-hand side. Now, as j runs from one to capital N, we basically here have a linear system of N equations that we need to solve. If we write it in matrix vector form using the transpose of K, you can easily see we can write down the solution of ours static finite element problem as U equals the inverse of K, multiplying the force vector. So, that's the solution. Now, let's conclude here at this point before going into an example later and looking at boundary conditions. Now, we've converted the infinite dimensional problem for finding the values of U to a finite dimensional problem by introducing the basis functions in limiting the solution to linear functions defined inside N elements. So that's a major improvement because now we can actually solve this on a computer. You can ask the question, how large is that matrix? Well, the matrix is actually N square. So, N is the number of degrees of freedom. Now, for fully three-dimensional problem, this capital N can be huge, it can be millions. You can see here, we need to invert, you need to solve a matrix, so invert a matrix size N square. You think of a matrix millions by millions, forget it. That's really impossible. So, on the other hand, and we have not yet looked at the actual structure of the stiffness matrix, whether it's banded, whether it's complete, whether all the elements are non-zero. We will look into this later. Actually, there is a lot of very powerful tools in the linear algebra to find solutions to this linear system of equations or matrix inverse problems. We're going to look at this later.