In mathematics, in the area of numerical analysis, Galerkin methods are named after the Soviet mathematician Boris Galerkin. They convert a continuous operator problem, such as a differential equation, commonly in a weak formulation, to a discrete problem by applying linear constraints determined by finite sets of basis functions.
 Often when referring to a Galerkin method, one also gives the name along with typical assumptions and approximation methods used:
 Examples of Galerkin methods are:
 We first introduce and illustrate the Galerkin method as being applied to a system of linear equations 
  
    
      
        A
        
          x
        
        =
        
          b
        
      
    
    {\displaystyle A\mathbf {x} =\mathbf {b} }
  
 with the following symmetric and positive definite matrix
 and the solution and right-hand-side vectors
 Let us take
 then the matrix of the Galerkin equation[clarification needed] is
 the right-hand-side vector of the Galerkin equation is
 so that we obtain the solution vector 
 to the Galerkin equation 
  
    
      
        
          (
          
            
              V
              
                ∗
              
            
            A
            V
          
          )
        
        
          y
        
        =
        
          V
          
            ∗
          
        
        
          b
        
      
    
    {\displaystyle \left(V^{*}AV\right)\mathbf {y} =V^{*}\mathbf {b} }
  
, which we finally uplift[clarification needed] to determine the approximate solution to the original equation as
 In this example, our original Hilbert space is actually the 3-dimensional Euclidean space 
  
    
      
        
          
            R
          
          
            3
          
        
      
    
    {\displaystyle \mathbb {R} ^{3}}
  
 equipped with the standard scalar product 
  
    
      
        (
        
          u
        
        ,
        
          v
        
        )
        =
        
          
            u
          
          
            T
          
        
        
          v
        
      
    
    {\displaystyle (\mathbf {u} ,\mathbf {v} )=\mathbf {u} ^{T}\mathbf {v} }
  
, our 3-by-3 matrix 
  
    
      
        A
      
    
    {\displaystyle A}
  
 defines the bilinear form 
  
    
      
        a
        (
        
          u
        
        ,
        
          v
        
        )
        =
        
          
            u
          
          
            T
          
        
        A
        
          v
        
      
    
    {\displaystyle a(\mathbf {u} ,\mathbf {v} )=\mathbf {u} ^{T}A\mathbf {v} }
  
, and the right-hand-side vector 
  
    
      
        
          b
        
      
    
    {\displaystyle \mathbf {b} }
  
 defines the bounded linear functional 
  
    
      
        f
        (
        
          v
        
        )
        =
        
          
            b
          
          
            T
          
        
        
          v
        
      
    
    {\displaystyle f(\mathbf {v} )=\mathbf {b} ^{T}\mathbf {v} }
  
. The columns 
 of the matrix 
  
    
      
        V
      
    
    {\displaystyle V}
  
 form an orthonormal basis of the 2-dimensional subspace of the Galerkin projection. The entries of the 2-by-2 Galerkin matrix 
  
    
      
        
          V
          
            ∗
          
        
        A
        V
      
    
    {\displaystyle V^{*}AV}
  
 are 
  
    
      
        a
        (
        
          e
          
            j
          
        
        ,
        
          e
          
            i
          
        
        )
        ,
        
        i
        ,
        j
        =
        1
        ,
        2
      
    
    {\displaystyle a(e_{j},e_{i}),\,i,j=1,2}
  
, while the components of the right-hand-side vector 
  
    
      
        
          V
          
            ∗
          
        
        
          b
        
      
    
    {\displaystyle V^{*}\mathbf {b} }
  
 of the Galerkin equation are 
  
    
      
        f
        (
        
          e
          
            i
          
        
        )
        ,
        
        i
        =
        1
        ,
        2
      
    
    {\displaystyle f(e_{i}),\,i=1,2}
  
. Finally, the approximate solution 
  
    
      
        V
        
          y
        
      
    
    {\displaystyle V\mathbf {y} }
  
 is obtained from the components of the solution vector 
  
    
      
        
          y
        
      
    
    {\displaystyle \mathbf {y} }
  
 of the Galerkin equation and the basis as  
  
    
      
        
          ∑
          
            j
            =
            1
          
          
            2
          
        
        
          y
          
            j
          
        
        
          
            e
          
          
            j
          
        
      
    
    {\displaystyle \sum _{j=1}^{2}y_{j}\mathbf {e} _{j}}
  
.
 Let us introduce Galerkin's method with an abstract problem posed as a weak formulation on a Hilbert space 
  
    
      
        V
      
    
    {\displaystyle V}
  
, namely,
 Here, 
  
    
      
        a
        (
        ⋅
        ,
        ⋅
        )
      
    
    {\displaystyle a(\cdot ,\cdot )}
  
 is a bilinear form (the exact requirements on 
  
    
      
        a
        (
        ⋅
        ,
        ⋅
        )
      
    
    {\displaystyle a(\cdot ,\cdot )}
  
 will be specified later) and 
  
    
      
        f
      
    
    {\displaystyle f}
  
 is a bounded linear functional on 
  
    
      
        V
      
    
    {\displaystyle V}
  
.
 Choose a subspace 
  
    
      
        
          V
          
            n
          
        
        ⊂
        V
      
    
    {\displaystyle V_{n}\subset V}
  
 of dimension n and solve the projected problem:
 We call this the Galerkin equation. Notice that the equation has remained unchanged and only the spaces have changed.
Reducing the problem to a finite-dimensional vector subspace allows us to numerically compute 
  
    
      
        
          u
          
            n
          
        
      
    
    {\displaystyle u_{n}}
  
 as a finite linear combination of the basis vectors in 
  
    
      
        
          V
          
            n
          
        
      
    
    {\displaystyle V_{n}}
  
.
 The key property of the Galerkin approach is that the error is orthogonal to the chosen subspaces. Since  
  
    
      
        
          V
          
            n
          
        
        ⊂
        V
      
    
    {\displaystyle V_{n}\subset V}
  
, we can use 
  
    
      
        
          v
          
            n
          
        
      
    
    {\displaystyle v_{n}}
  
 as a test vector in the original equation. Subtracting the two, we get the Galerkin orthogonality relation for the error, 
  
    
      
        
          ϵ
          
            n
          
        
        =
        u
        −
        
          u
          
            n
          
        
      
    
    {\displaystyle \epsilon _{n}=u-u_{n}}
  
 which is the error between the solution of the original problem, 
  
    
      
        u
      
    
    {\displaystyle u}
  
, and the solution of the Galerkin equation, 
  
    
      
        
          u
          
            n
          
        
      
    
    {\displaystyle u_{n}}
  

 Since the aim of Galerkin's method is the production of a linear system of equations, we build its matrix form, which can be used to compute the solution algorithmically.
 Let 
  
    
      
        
          e
          
            1
          
        
        ,
        
          e
          
            2
          
        
        ,
        …
        ,
        
          e
          
            n
          
        
      
    
    {\displaystyle e_{1},e_{2},\ldots ,e_{n}}
  
 be a basis for 
  
    
      
        
          V
          
            n
          
        
      
    
    {\displaystyle V_{n}}
  
. Then, it is sufficient to use these in turn for testing the Galerkin equation, i.e.: find 
  
    
      
        
          u
          
            n
          
        
        ∈
        
          V
          
            n
          
        
      
    
    {\displaystyle u_{n}\in V_{n}}
  
 such that
 We expand 
  
    
      
        
          u
          
            n
          
        
      
    
    {\displaystyle u_{n}}
  
 with respect to this basis, 
  
    
      
        
          u
          
            n
          
        
        =
        
          ∑
          
            j
            =
            1
          
          
            n
          
        
        
          u
          
            j
          
        
        
          e
          
            j
          
        
      
    
    {\displaystyle u_{n}=\sum _{j=1}^{n}u_{j}e_{j}}
  
 and insert it into the equation above, to obtain
 This previous equation is actually a linear system of equations 
  
    
      
        A
        u
        =
        f
      
    
    {\displaystyle Au=f}
  
, where
 Due to the definition of the matrix entries, the matrix of the Galerkin equation is symmetric if and only if the bilinear form 
  
    
      
        a
        (
        ⋅
        ,
        ⋅
        )
      
    
    {\displaystyle a(\cdot ,\cdot )}
  
 is symmetric.
 Here, we will restrict ourselves to symmetric bilinear forms, that is
 While this is not really a restriction of Galerkin methods, the application of the standard theory becomes much simpler. Furthermore, a Petrov–Galerkin method may be required in the nonsymmetric case.
 The analysis of these methods proceeds in two steps. First, we will show that the Galerkin equation is a well-posed problem in the sense of Hadamard and therefore admits a unique solution. In the second step, we study the quality of approximation of the Galerkin solution 
  
    
      
        
          u
          
            n
          
        
      
    
    {\displaystyle u_{n}}
  
.
 The analysis will mostly rest on two properties of the bilinear form, namely
 By the Lax-Milgram theorem (see weak formulation), these two conditions imply well-posedness of the original problem in weak formulation. All norms in the following sections will be norms for which the above inequalities hold (these norms are often called an energy norm).
 Since 
  
    
      
        
          V
          
            n
          
        
        ⊂
        V
      
    
    {\displaystyle V_{n}\subset V}
  
, boundedness and ellipticity of the bilinear form apply to 
  
    
      
        
          V
          
            n
          
        
      
    
    {\displaystyle V_{n}}
  
. Therefore, the well-posedness of the Galerkin problem is actually inherited from the well-posedness of the original problem.
 The error 
  
    
      
        u
        −
        
          u
          
            n
          
        
      
    
    {\displaystyle u-u_{n}}
  
 between the original and the Galerkin solution admits the estimate
 This means, that up to the constant 
  
    
      
        C
        
          /
        
        c
      
    
    {\displaystyle C/c}
  
, the Galerkin solution 
  
    
      
        
          u
          
            n
          
        
      
    
    {\displaystyle u_{n}}
  

is as close to the original solution 
  
    
      
        u
      
    
    {\displaystyle u}
  
 as any other vector in 
  
    
      
        
          V
          
            n
          
        
      
    
    {\displaystyle V_{n}}
  
. In particular, it will be sufficient to study approximation by spaces 
  
    
      
        
          V
          
            n
          
        
      
    
    {\displaystyle V_{n}}
  
, completely forgetting about the equation being solved.
 Since the proof is very simple and the basic principle behind all Galerkin methods, we include it here:
by ellipticity and boundedness of the bilinear form (inequalities) and Galerkin orthogonality (equals sign in the middle), we have for arbitrary 
  
    
      
        
          v
          
            n
          
        
        ∈
        
          V
          
            n
          
        
      
    
    {\displaystyle v_{n}\in V_{n}}
  
:
 Dividing by 
  
    
      
        c
        ‖
        u
        −
        
          u
          
            n
          
        
        ‖
      
    
    {\displaystyle c\|u-u_{n}\|}
  
 and taking the infimum over all possible 
  
    
      
        
          v
          
            n
          
        
      
    
    {\displaystyle v_{n}}
  
 yields the lemma.
 For simplicity of presentation in the section above we have assumed that the bilinear form 
  
    
      
        a
        (
        u
        ,
        v
        )
      
    
    {\displaystyle a(u,v)}
  
 is symmetric and positive definite, which implies that it is a scalar product and the expression 
  
    
      
        ‖
        u
        
          ‖
          
            a
          
        
        =
        
          
            a
            (
            u
            ,
            u
            )
          
        
      
    
    {\displaystyle \|u\|_{a}={\sqrt {a(u,u)}}}
  
 is actually a valid vector norm, called the energy norm. Under these assumptions one can easily prove in addition Galerkin's best approximation property in the energy norm.  
 Using Galerkin a-orthogonality and the Cauchy–Schwarz inequality for the energy norm, we obtain
 Dividing by 
  
    
      
        ‖
        u
        −
        
          u
          
            n
          
        
        
          ‖
          
            a
          
        
      
    
    {\displaystyle \|u-u_{n}\|_{a}}
  
 and taking the infimum over all possible 
  
    
      
        
          v
          
            n
          
        
        ∈
        
          V
          
            n
          
        
      
    
    {\displaystyle v_{n}\in V_{n}}
  
 proves that the Galerkin approximation 
  
    
      
        
          u
          
            n
          
        
        ∈
        
          V
          
            n
          
        
      
    
    {\displaystyle u_{n}\in V_{n}}
  
 is the best approximation in the energy norm within the subspace 
  
    
      
        
          V
          
            n
          
        
        ⊂
        V
      
    
    {\displaystyle V_{n}\subset V}
  
, i.e. 
  
    
      
        
          u
          
            n
          
        
        ∈
        
          V
          
            n
          
        
      
    
    {\displaystyle u_{n}\in V_{n}}
  
 is nothing but the orthogonal, with respect to the scalar product 
  
    
      
        a
        (
        u
        ,
        v
        )
      
    
    {\displaystyle a(u,v)}
  
, projection of the solution 
  
    
      
        u
      
    
    {\displaystyle u}
  
 to the subspace 
  
    
      
        
          V
          
            n
          
        
      
    
    {\displaystyle V_{n}}
  
.
 I. Elishakof, M. Amato, A. Marzani, P.A. Arvan, and J.N. Reddy 




studied the application of the Galerkin method to stepped structures. They showed that the generalized function, namely unit-step function, Dirac’s delta function, and the doublet function are needed for obtaining accurate results. 
 The approach is usually credited to Boris Galerkin. The method was explained to the Western reader by Hencky and Duncan among others. Its convergence was studied by Mikhlin and Leipholz Its coincidence with Fourier method was illustrated by Elishakoff et al. Its equivalence to Ritz's method for conservative problems was shown by Singer. Gander and Wanner showed how Ritz and Galerkin methods led to the modern finite element method. One hundred years of method's development was discussed by Repin. Elishakoff, Kaplunov and Kaplunov show that the Galerkin’s method was not developed by Ritz, contrary to the Timoshenko’s statements.