Jacobi method

In numerical linear algebra, the Jacobi method (a.k.a. the Jacobi iteration method) is an iterative algorithm for determining the solutions of a strictly diagonally dominant system of linear equations. Each diagonal element is solved for, and an approximate value is plugged in. The process is then iterated until it converges. This algorithm is a stripped-down version of the Jacobi transformation method of matrix diagonalization. The method is named after Carl Gustav Jacob Jacobi.

Description

Let be a square system of n linear equations, where:

When and are known, and is unknown, we can use the Jacobi method to approximate . The vector denotes our initial guess for (often for ). We denote as the k-th approximation or iteration of , and is the next (or k+1) iteration of .

Matrix-based formula

Then A can be decomposed into a diagonal component D, a lower triangular part L and an upper triangular part U:The solution is then obtained iteratively via

Element-based formula

The element-based formula for each row is thus:The computation of requires each element in except itself. Unlike the Gauss–Seidel method, we can't overwrite with , as that value will be needed by the rest of the computation. The minimum amount of storage is two vectors of size n.

Algorithm

Input: initial guess x(0) to the solution, (diagonal dominant) matrix A, right-hand side vector b, convergence criterion
Output: solution when convergence is reached
Comments: pseudocode based on the element-based formula above

k = 0
while convergence not reached do
    for i := 1 step until n do
        σ = 0
        for j := 1 step until n do
            if ji then
                σ = σ + aij xj(k)
            end
        end
        xi(k+1) = (biσ) / aii
    end
    increment k
end

Convergence

The standard convergence condition (for any iterative method) is when the spectral radius of the iteration matrix is less than 1:

A sufficient (but not necessary) condition for the method to converge is that the matrix A is strictly or irreducibly diagonally dominant. Strict row diagonal dominance means that for each row, the absolute value of the diagonal term is greater than the sum of absolute values of other terms:

The Jacobi method sometimes converges even if these conditions are not satisfied.

Note that the Jacobi method does not converge for every symmetric positive-definite matrix. For example,

Examples

Example question

A linear system of the form with initial estimate is given by

We use the equation , described above, to estimate . First, we rewrite the equation in a more convenient form , where and . From the known values we determine as Further, is found as With and calculated, we estimate as : The next iteration yields This process is repeated until convergence (i.e., until is small). The solution after 25 iterations is

Example question 2

Suppose we are given the following linear system:

If we choose (0, 0, 0, 0) as the initial approximation, then the first approximate solution is given by Using the approximations obtained, the iterative procedure is repeated until the desired accuracy has been reached. The following are the approximated solutions after five iterations.

0.6 2.27272 -1.1 1.875
1.04727 1.7159 -0.80522 0.88522
0.93263 2.05330 -1.0493 1.13088
1.01519 1.95369 -0.9681 0.97384
0.98899 2.0114 -1.0102 1.02135

The exact solution of the system is (1, 2, −1, 1).

Python example

import numpy as np

ITERATION_LIMIT = 1000

# initialize the matrix
A = np.array([[10., -1., 2., 0.],
              [-1., 11., -1., 3.],
              [2., -1., 10., -1.],
              [0.0, 3., -1., 8.]])
# initialize the RHS vector
b = np.array([6., 25., -11., 15.])

# prints the system
print("System:")
for i in range(A.shape[0]):
    row = [f"{A[i, j]}*x{j + 1}" for j in range(A.shape[1])]
    print(f'{" + ".join(row)} = {b[i]}')
print()

x = np.zeros_like(b)
for it_count in range(ITERATION_LIMIT):
    if it_count != 0:
        print(f"Iteration {it_count}: {x}")
    x_new = np.zeros_like(x)

    for i in range(A.shape[0]):
        s1 = np.dot(A[i, :i], x[:i])
        s2 = np.dot(A[i, i + 1:], x[i + 1:])
        x_new[i] = (b[i] - s1 - s2) / A[i, i]
        if x_new[i] == x_new[i-1]:
          break

    if np.allclose(x, x_new, atol=1e-10, rtol=0.):
        break

    x = x_new

print("Solution: ")
print(x)
error = np.dot(A, x) - b
print("Error:")
print(error)

Weighted Jacobi method

The weighted Jacobi iteration uses a parameter to compute the iteration as

with being the usual choice.[1] From the relation , this may also be expressed as

.

Convergence in the symmetric positive definite case

In case that the system matrix is of symmetric positive-definite type one can show convergence.

Let be the iteration matrix. Then, convergence is guaranteed for

where is the maximal eigenvalue.

The spectral radius can be minimized for a particular choice of as follows where is the matrix condition number.

See also

References

  1. ^ Saad, Yousef (2003). Iterative Methods for Sparse Linear Systems (2nd ed.). SIAM. p. 414. ISBN 0898715342.

Read other articles:

Kejuaraan Dunia U-17 FIFA 1993(Jepang) 1993 FIFA U-17世界選手権Logo Kejuaraan Dunia U-17 FIFA 1993Informasi turnamenTuan rumahJepangJadwalpenyelenggaraan21 Agustus – 4 September 1993Jumlahtim peserta16 (dari 6 konfederasi)Tempatpenyelenggaraan6 (di 6 kota)Hasil turnamenJuara Nigeria (gelar ke-2)Tempat kedua GhanaTempat ketiga ChiliTempat keempat PolandiaStatistik turnamenJumlahpertandingan32Jumlah gol107 (3,34 per pertandingan)Jumlahpenonton233.004...

 

 

Moshe ben Maimon (Maimonides)Lahir1135Córdoba, Spanyol, Al-Murabithun (sekarang Spanyol)Meninggal12 Desember 1204 (usia 69)Fostat, Mesir, atau Cairo, Mesir[1]EraFilsafat Abad PertengahanKawasanArab MediteraniaAliranFilsafat Yahudi, Hukum Yudaisme, Etika Yudaisme Dipengaruhi Talmud, Aristoteles, al-Farabi, Ibnu Sina, Ibnu Bajjah, Ar-Razi, Al-Ghazali[2][3] Memengaruhi Jeremiah Stamler, Spinoza, Aquinas, Joyce, Bodin, Leibniz, Newton,[4] Strauss, Friedländer, L...

 

 

Maine's 5th congressional districtObsolete districtCreated1821Eliminated1883Years active1821-1883 Maine's 5th congressional district was a congressional district in Maine. It was created in 1821 after Maine achieved statehood in 1820. It was eliminated in 1883. Its last congressman was Thompson Henry Murch. List of members representing the district Member Party Years ↑ Congress Electoral history District location District created March 4, 1821 Ebenezer Herrick(Bowdoinham) Democratic-Republ...

العلاقات الجزائرية الليسوتوية الجزائر ليسوتو   الجزائر   ليسوتو تعديل مصدري - تعديل   العلاقات الجزائرية الليسوتوية هي العلاقات الثنائية التي تجمع بين الجزائر وليسوتو.[1][2][3][4][5] مقارنة بين البلدين هذه مقارنة عامة ومرجعية للدولتين: وجه الم...

 

 

العلاقات الغرينادية الكوستاريكية غرينادا كوستاريكا   غرينادا   كوستاريكا تعديل مصدري - تعديل   العلاقات الغرينادية الكوستاريكية هي العلاقات الثنائية التي تجمع بين غرينادا و‌كوستاريكا.[1][2][3][4][5] مقارنة بين البلدين هذه مقارنة عامة ومرجعي�...

 

 

Dewan Perwakilan Rakyat Daerah Kabupaten BojonegoroDewan Perwakilan RakyatKabupaten Bojonegoro2019-2024JenisJenisUnikameral Jangka waktu5 tahunSejarahSesi baru dimulai21 Agustus 2019PimpinanKetuaAbdullah Umar, S.Pd. (PKB) sejak 2 Februari 2022 Wakil Ketua IH. Sukur Priyanto, S.E., M.A.P. (Demokrat) sejak 17 September 2019 Wakil Ketua IISahudi, S.E. (Gerindra) sejak 17 September 2019 Wakil Ketua IIIHj. Mitro’atin, S.Pd. (Golkar) sejak 17 September 2019 KomposisiAnggota50Parta...

International airport in Varanasi, Uttar Pradesh, India Lal Bahadur Shastri International Airport IATA: VNSICAO: VEBNSummaryAirport typePublicOwnerGovernment of IndiaOperatorAirports Authority of IndiaServesVaranasiLocationBabatpur, Varanasi district, Uttar Pradesh, IndiaElevation AMSL270 ft / 82.30 mCoordinates25°27′08″N 082°51′34″E / 25.45222°N 82.85944°E / 25.45222; 82.85944WebsiteVaranasi AirportMapVNSLocation of airport in Uttar PradeshS...

 

 

Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada Oktober 2022. Nanokapasitor adalah kapasitor dengan ukuran nanometer. Bahan pembuatannya adalah logam yang berbentuk bola. Nilai kapasitansi nanokapasitor sebesar 1,11 × 10−19 Farad. Pada kondisi normal, nanokapasitor tidak bermuatan listrik. Nanokapasitor hanya ...

 

 

Darryn BinderBinder di tahun 2019KebangsaanAfrika SelatanLahir21 Januari 1998 (umur 26)Potchefstroom, Afrika SelatanTim saat iniPetronas Sprinta RacingNo. motor40 Catatan statistik Karier Kejuaraan Dunia Moto3Tahun aktif2015– PabrikanMahindra, KTM Klasemen 20208th (122 poin) Start Menang Podium Pole F. lap Poin 100 1 5 2 4 311 Darryn Binder (lahir 21 Januari 1998) adalah pembalap motor profesional Afrika Selatan yang berkompetisi di kelas Moto2. Karier Binder lahir di Potchefstroom, Af...

Neil ArmstrongUnited States Navy/Astronauta della NASANazionalità Stati Uniti StatusDeceduto Data di nascita5 agosto 1930 Data di morte25 agosto 2012 Selezione1962 (gruppo 2 NASA) Primo lancio16 marzo 1966 Ultimo atterraggio24 luglio 1969 Altre attivitàPilota collaudatore Tempo nello spazio8 giorni, 14 ore, 12 minuti e 30 secondi Numero EVA1 Durata EVA2 h 31 min Missioni Gemini 8 Apollo 11 Data ritiroagosto 1970 Modifica dati su Wikidata · Manuale (EN) «That's one small step for...

 

 

Form of entropy encoding used in data compression This article includes a list of general references, but it lacks sufficient corresponding inline citations. Please help to improve this article by introducing more precise citations. (September 2016) (Learn how and when to remove this message) Arithmetic coding (AC) is a form of entropy encoding used in lossless data compression. Normally, a string of characters is represented using a fixed number of bits per character, as in the ASCII code. W...

 

 

تيست درايف سيكلز Test Drive Cycles غلاف اللعبة عبر جيم بوي كولر المطور زانتيرا الناشر إنفوجرامز أمريكا الشمالية سلسلة اللعبة تيست درايف النظام جيم بوي تاریخ الإصدار أغسطس 2000 (أ.ش) نوع اللعبة لعبة سباق الدراجات النارية النمط لعبة فيديو فرديةلعبة فيديو جماعية الوسائط تحميل التقييم...

Bulgarian footballer Vladislav Zlatinov Zlatinov playing for Beroe in 2010Personal informationFull name Vladislav Hristov ZlatinovDate of birth (1983-03-23) 23 March 1983 (age 41)Place of birth Sandanski, BulgariaHeight 1.82 m (6 ft 0 in)Position(s) ForwardTeam informationCurrent team Septemvri SimitliNumber 9Youth career Vihren CSKA SofiaSenior career*Years Team Apps (Gls)2002–2003 Vihren 19 (7)2003–2005 Pirin Blagoevgrad 53 (35)2005–2008 Lokomotiv Plovdiv 58 (10)20...

 

 

This biography of a living person needs additional citations for verification. Please help by adding reliable sources. Contentious material about living persons that is unsourced or poorly sourced must be removed immediately from the article and its talk page, especially if potentially libelous.Find sources: Marie Ortal Malka – news · newspapers · books · scholar · JSTOR (May 2010) (Learn how and when to remove this message) Marie Ortal Malka (born 13 ...

 

 

This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Pakistanis in Oman – news · newspapers · books · scholar · JSTOR (January 2021) (Learn how and when to remove this message) Ethnic group Pakistanis in OmanA Pakistani restaurant in RustaqTotal population231,685 (November 2016)[1]Regions with significant...

Bagian dari seriGereja Katolik menurut negara Afrika Afrika Selatan Afrika Tengah Aljazair Angola Benin Botswana Burkina Faso Burundi Chad Eritrea Eswatini Etiopia Gabon Gambia Ghana Guinea Guinea-Bissau Guinea Khatulistiwa Jibuti Kamerun Kenya Komoro Lesotho Liberia Libya Madagaskar Malawi Mali Maroko Mauritania Mauritius Mesir Mozambik Namibia Niger Nigeria Pantai Gading Republik Demokratik Kongo Republik Kongo Rwanda Sao Tome dan Principe Senegal Seychelles Sierra Leone Somalia Somaliland ...

 

 

City in Kantō, JapanKatori 香取市City Sawara old townKatori JinguSawara Mitsubishi-kanSawara O-MatsuriIno Tadataka house Suigō Sawara Iris Park FlagSealLocation of Katori in Chiba PrefectureKatori Coordinates: 35°41′N 140°2′E / 35.683°N 140.033°E / 35.683; 140.033CountryJapanRegionKantōPrefectureChibaGovernment • MayorSeiichi Ui (since May 2006)Area • Total262.31 km2 (101.28 sq mi)Population (November 1, 20...

 

 

Noah O. KnightPenerima Medal of HonorLahir(1929-10-27)27 Oktober 1929McBee, Carolina SelatanMeninggal24 November 1951(1951-11-24) (umur 22)dekat Kowang-San, KoreaTempat pemakamanUnion Hill Baptist Church Cemetery, Pageland, Carolina SelatanPengabdianAmerika SerikatDinas/cabangAngkatan Darat Amerika SerikatLama dinas-1951PangkatPrivat Kelas SatuKesatuanCompany F, 7th Infantry Regiment, 3rd Infantry DivisionPerang/pertempuranPerang Korea  (DOW)PenghargaanMedal of HonorPurple Hear...

У Вікіпедії є статті про інші значення цього терміна: Ягода (значення). Чотири типи дійсних ягід; за годинниковою стрілкою справа: виноград, хурма, аґрус, порічки (верх). Кілька типів «ягід» у звичайному розумінні, жодна з яких не є ягодою з ботанічної точки зору; згори дон...

 

 

Railway station in Northern Ireland This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Adavoyle railway station – news · newspapers · books · scholar · JSTOR (November 2015) (Learn how and when to remove this message) AdavoyleRemains of the station photographed on 24 August 2007General informationLocationAdavoy...