In mathematical terminology, the Graph is a pictorial representation of or a diagram represents data.

The graph is a non-linear data structure. Hierarchical data structure. The graph data structure contains vertices and edges. In this data, structure vertices mean Nodes and edges means a relationship between two nodes.

The connection between Nodes is called edges. There is no specific set of rules for Graphs in terms of connections.

## Types of Graphs:

### Directed Graphs:

Directed graphs contain the directions for edges

Example for directed graphs are Webpages on the Internet

#### Undirected Graphs:

UnDirected Graphs don’t maintain any directions between nodes.

Examples for Undirected graphs are Social networking sites

#### Adjacency List:

representation with JSON

#### Adjacency Matrix:

representation in the form of matrix two-dimensional array

Rows to represent Nodes. Columns to represent Nodes. Values represent the connection between them

#### Incidence Matrix:

representation in the form of matrix two-dimensional array

Rows to represent Nodes. Columns to represent Edges.

#### Applications:

A wide number of applications in real-world like social networking websites.