MathsAdjacency Matrix – Definition, Properties and Solved Questions

Adjacency Matrix – Definition, Properties and Solved Questions

What is Adjacency Matrix?

Adjacency Matrix – Definition: An adjacency matrix is a mathematical matrix used to represent a graph. It has an entry in each row and column for each vertex in the graph. The entry in the ith row and jth column is 1 if there is an edge from vertex i to vertex j, and 0 otherwise.

    Fill Out the Form for Expert Academic Guidance!



    +91


    Live ClassesBooksTest SeriesSelf Learning




    Verify OTP Code (required)

    I agree to the terms and conditions and privacy policy.

    Adjacency Matrix - Definition, Properties and Solved Questions

    Following are the Key Properties of an Adjacency Matrix:

    1. An adjacency matrix is a square matrix that contains a binary (0 or 1) value in each entry, representing whether or not two vertices are adjacent.
    2. The diagonal of the adjacency matrix is all 1s, since every vertex is adjacent to itself.
    3. The adjacency matrix is symmetric, meaning that the matrix is the same if you swap the rows and columns.
    4. The adjacency matrix is also directed, meaning that the direction of the edge matters. For example, in a graph with edges (A,B) and (B,C), the adjacency matrix would have a 1 in the row for A and the column for B, and a 1 in the row for B and the column for C.

    How to create an Adjacency Matrix?

    An adjacency matrix is a square matrix that contains a boolean value (true or false) in each element, where the element represents whether or not two vertices are adjacent.

    Properties of Adjacent Matrix –

    Matrix and Vector

    A matrix an array of numbers arranged in rows and columns. A vector is a one-dimensional array of numbers.

    The matrix and vector have the following properties:

    • matrix is two-dimensional, while the vector is one-dimensional.
    • The matrix has a number of rows and columns, while the vector has a number of elements.
    • matrix is rectangular, while the vector is linear.
    • The matrix is static, while the vector is dynamic.
    • matrix fixed, while the vector is variable.

    Adjacency Matrix of an Undirected Graph-

    A graph is a collection of points, called vertices, and the lines connecting them, called edges.

    Adjacency Matrix of a Directed Graph

    The adjacency matrix of a directed graph is a square matrix, where the i-th row and column represent the vertices of the graph, and the entry in the i-th row and column is 1 if there is an edge from vertex i to vertex j, and 0 otherwise.

    The adjacency matrix for a directed graph can computed using the following algorithm:

    Algorithm: Adjacency Matrix for a Directed Graph

    1. Create a square matrix, where the i-th row and column represent the vertices of the graph, and the entry in the i-th row and column is 1 if there is an edge from vertex i to vertex j, and 0 otherwise.
    2. Set all entries in the matrix to 0.
    3. For each i and j, set the entry in the i-th row and column to 1 if there is an edge from vertex i to vertex j, and 0 otherwise.

    Questions to Solved-

    1. How much water flows through the Hoover Dam in a year?
    2. How many turbines are at the Hoover Dam?
    3. What is the maximum capacity of the Hoover Dam?
    Chat on WhatsApp Call Infinity Learn

      Talk to our academic expert!



      +91


      Live ClassesBooksTest SeriesSelf Learning




      Verify OTP Code (required)

      I agree to the terms and conditions and privacy policy.